From d883a647dcf049690e73ceb25106a203a2574d90 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Tue, 13 Dec 2016 10:50:17 -0700 Subject: [PATCH] fixed setup of authorization and deprecation of SSH keys. --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 79c574f..d89c395 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -47,7 +47,7 @@ - name: setup ssh authorized keys authorized_key: user="{{ item.0.name }}" - key="{{ lookup('file', '{{ system_ssh_dir_public_keys }}/{{ item.1.value }}.pub') }}" + key="{{ lookup('file', '{{ system_ssh_dir_public_keys }}/{{ item.1 }}.pub') }}" when: system_ssh_dir_public_keys is defined with_subelements: - "{{ system_users }}" @@ -56,8 +56,8 @@ - name: remove deprecated ssh keys authorized_key: - user="{{ item.0.name }}" - key="{{ lookup('file', '{{ system_ssh_dir_deprecated_keys }}/{{ item.1.value }}') }}" + user="{{ system_users[item.0].name }}" + key="{{ lookup('file', '{{ system_ssh_dir_deprecated_keys }}/{{ item.1 }}.pub') }}" state=absent when: system_ssh_dir_deprecated_keys is defined and system_ssh_deprecated_keys is defined with_nested: