summaryrefslogtreecommitdiff
path: root/roles/unix_users/tasks/main.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-10-21 10:57:35 +0300
committerLars Wirzenius <liw@liw.fi>2020-10-21 10:57:35 +0300
commit32ab130707616ed01aed81e8b10dc63f445d2278 (patch)
treebf83cf125d39cd2fc3f3b2be12f0989454dcace5 /roles/unix_users/tasks/main.yml
parent4702f64f2e26f0294ab7a3b24cad7d198d21b054 (diff)
downloaddebian-ansible-32ab130707616ed01aed81e8b10dc63f445d2278.tar.gz
unix_users: drop obsolete authkeys_dir variable, bump version
Also, document the variables in the subplot.
Diffstat (limited to 'roles/unix_users/tasks/main.yml')
-rw-r--r--roles/unix_users/tasks/main.yml11
1 files changed, 2 insertions, 9 deletions
diff --git a/roles/unix_users/tasks/main.yml b/roles/unix_users/tasks/main.yml
index 097815f..cd6fb66 100644
--- a/roles/unix_users/tasks/main.yml
+++ b/roles/unix_users/tasks/main.yml
@@ -1,6 +1,6 @@
- name: "check unix_users_version"
shell: |
- [ "{{ unix_users_version }}" = "0" ] || \
+ [ "{{ unix_users_version }}" = "1" ] || \
(echo "Unexpected version {{ unix_users_version }}" 1>&2; exit 1)
- name: create system users
@@ -48,14 +48,7 @@
group: "{{ item.username }}"
mode: 0600
-- name: add keys to authorized_keys (deprecated way)
- with_items: "{{ unix_users }}"
- when: authkeys_dir != None
- authorized_key:
- user: "{{ item.username }}"
- key: "{{ lookup('file', authkeys_dir + '/' + item.username) }}"
-
-- name: add keys to authorized_keys (new way)
+- name: add keys to authorized_keys
with_items: "{{ unix_users }}"
when: item.authorized_keys is defined
authorized_key: