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

Add the 'expires' parameter to the user module #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ The following attributes are required for each user:
* update_password - This can be either 'always' or 'on_create'
- 'always' will update passwords if they differ. (default)
- 'on_create' will only set the password for newly created users.
* expires - Optional expiry time for the user in epoch, it will be ignored on
platforms that do not support this. Since Ansible 2.6 you can remove the
expiry time by specifying a negative value. Currently supported on GNU/Linux
and FreeBSD.
* group - Optional primary group override.
* groups - A list of supplementary groups for the user.
* append - If yes, will only add groups, not set them to just the list in groups (optional).
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
createhome: "{{ 'yes' if users_create_homedirs else 'no' }}"
generate_ssh_key: "{{ item.generate_ssh_key | default(omit) }}"
update_password: "{{ item.update_password | default(omit) }}"
expires: "{{ item.expires | default(omit) }}"
with_items: "{{ users }}"
tags: ["users", "configuration"]

Expand Down