From a174f25e59f026b2c7a5f8c05ac5565b929d8fd4 Mon Sep 17 00:00:00 2001 From: Karthik Karunamoorthi Date: Mon, 3 Feb 2020 13:22:38 +0530 Subject: [PATCH] this to remove the existing keys if it is not present in the keys file . It would be addressing the issue raised in the Removing ssh keys #56 --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index 233c687..bf8ac92 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -37,6 +37,7 @@ user: "{{ item.0.username }}" key: "{{ item.1 }}" path: "{{ item.0.home | default('/home/' + item.0.username) }}/{{ authorized_keys_file }}" + exclusive: yes with_subelements: - "{{ users }}" - ssh_key