Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added gecos attribute. #459

Merged
merged 2 commits into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions roles/regular_users/tasks/ldap_regular_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
attributes:
sshPublicKey: "{{ auth_users[item.user].pub_keys }}"
mail: "{{ auth_users[item.user].email }}"
#
# The to_json(ensure_ascii=True) filter is a temporary hack to remove non ASCII characters,
# which are not supported in the gecos attribute from the RFC2307 schema.
# We can use all characters in the gecos field once we switch to the RFC2307bis schema, which uses UTF-8.
#
gecos: "{{ auth_users[item.user].comment | to_json(ensure_ascii=True) }}\
{% if auth_users[item.user].email is defined and auth_users[item.user].email | length %} <{{ auth_users[item.user].email }}>{% endif %}"
with_items: "{{ regular_users }}"

- name: 'Add users to groups.'
Expand Down