From 32ab130707616ed01aed81e8b10dc63f445d2278 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 21 Oct 2020 10:57:35 +0300 Subject: unix_users: drop obsolete authkeys_dir variable, bump version Also, document the variables in the subplot. --- roles/unix_users/tasks/main.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'roles/unix_users/tasks/main.yml') 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: -- cgit v1.2.1