aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2019-01-13 22:12:16 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2019-01-13 22:12:16 +0100
commite8469ae75248c7020372985041eb5eeedb1ae22e (patch)
tree78b82b1e9198900aff4edcdbf5d7b9e3b68a50a6 /roles
parentbbced59f27d07563734cd0b3cb3da5e4e77634ae (diff)
downloadlabitat-ansible-e8469ae75248c7020372985041eb5eeedb1ae22e.tar.gz
labitat-ansible-e8469ae75248c7020372985041eb5eeedb1ae22e.tar.xz
labitat-ansible-e8469ae75248c7020372985041eb5eeedb1ae22e.zip
users: optionally set user password
Diffstat (limited to 'roles')
-rw-r--r--roles/users/tasks/main.yml1
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 }}'