aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/sshd/tasks/synchronize_keys.yml (renamed from roles/sshd/tasks/sync_keys.yml)7
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/sshd/tasks/sync_keys.yml b/roles/sshd/tasks/synchronize_keys.yml
index 73aa741..cb634a4 100644
--- a/roles/sshd/tasks/sync_keys.yml
+++ b/roles/sshd/tasks/synchronize_keys.yml
@@ -1,19 +1,20 @@
- name: retrieve all existing users
- shell: cut -d ":" -f 1 /etc/passwd
+ command: cut -d ":" -f 1 /etc/passwd
register: sshd_users
changed_when: false
-- name: bind retrieved users output lines to list
+- name: convert retrieved users to list
set_fact:
sshd_users: "{{ sshd_users.stdout_lines }}"
- name: get ssh keys for all user
find:
- paths: "{{ inventory_dir }}/files/pubkeys"
+ paths: "{{ inventory_dir }}/files/keys"
pattern: "*.pub"
recurse: true
file_type: link
register: keys
+ run_once: true
delegate_to: localhost
- name: show pubkeys
remember that computers suck.