diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2019-01-13 22:12:16 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2019-01-13 22:12:16 +0100 |
commit | e8469ae75248c7020372985041eb5eeedb1ae22e (patch) | |
tree | 78b82b1e9198900aff4edcdbf5d7b9e3b68a50a6 /roles/users/tasks | |
parent | bbced59f27d07563734cd0b3cb3da5e4e77634ae (diff) | |
download | labitat-ansible-e8469ae75248c7020372985041eb5eeedb1ae22e.tar.gz labitat-ansible-e8469ae75248c7020372985041eb5eeedb1ae22e.tar.xz labitat-ansible-e8469ae75248c7020372985041eb5eeedb1ae22e.zip |
users: optionally set user password
Diffstat (limited to 'roles/users/tasks')
-rw-r--r-- | roles/users/tasks/main.yml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index 23a4945..db38667 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -11,6 +11,7 @@ comment: '{{ userdata[item].name }}' shell: "{{ ('shell' in userdata[item])|ternary(userdata[item].shell,'/bin/bash') }}" uid: '{{ userdata[item].uid }}' + password: "{{ ('password' in userdata[item])|ternary(userdata[item].password,omit) }}" group: users groups: "{{ (users[item] == 'sudo')|ternary([sudo_group],[]) }}" with_items: '{{ users|dictsort()|selectattr(1)|map(attribute=0)|list }}' |