Skip to content

Commit e13e9c5

Browse files
author
Colin Hoglund
committed
add update_password parameter
1 parent 8f65d1c commit e13e9c5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ The following attributes are required for each user:
3333
uid will be used
3434
* password - If a hash is provided then that will be used, but otherwise the
3535
account will be locked
36+
* update_password - This can be either 'always' or 'on_create'
37+
- 'always' will update passwords if they differ. (default)
38+
- 'on_create' will only set the password for newly created users.
3639
* group - optional primary group override
3740
* groups - a list of supplementary groups for the user.
3841
* profile - a string block for setting custom shell profiles

tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
home: "{{ item.home | default('/home/' + item.username) }}"
2525
createhome: "{{'yes' if users_create_homedirs else 'no'}}"
2626
generate_ssh_key: "{{ item.generate_ssh_key | default(omit) }}"
27+
update_password: "{{item.update_password | default(omit)}}"
2728
with_items: "{{users}}"
2829
tags: ['users','configuration']
2930

0 commit comments

Comments
 (0)