From c0d69812f9ad1f677e4b97e46c3e9a54f18a7a24 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 26 Jul 2022 11:13:59 -0400 Subject: [PATCH] ansible: remove frdeso ssh key from nodes Change-Id: I70ca5c247122258904c827c13d2c0f8f605d6e68 --- .../ansible/roles/common/public_keys/frdeso.pub | 1 - automation/ansible/roles/common/tasks/main.yml | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 automation/ansible/roles/common/public_keys/frdeso.pub diff --git a/automation/ansible/roles/common/public_keys/frdeso.pub b/automation/ansible/roles/common/public_keys/frdeso.pub deleted file mode 100644 index f23b140..0000000 --- a/automation/ansible/roles/common/public_keys/frdeso.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDC06no7kHoEh/8w5tEyLP+Qj3iGCNkxTbfhDkJ04R6coNMuicrJKRvvwG+N/L090krpEJ3UiLc79BCLZqqfJRD983yNsTzwcqa6ZswRlkrL+Wq4FKe5XT28zM7m6whclZH33lFKSroxII92FDy5ZfrmiWYIrhur+sncHUOPct9i9w9sPLBMPAQ7IkWM+yNV2QCoSEABjAudtJbi6Ndba4PFEbM3NJsMJSVFlI+1Vy3fad+Yye5kcDMiuMN+ea/I4lslwHfImIbpQ2rX/7NA4ulkczz1wtZsXL/oCWu/ewpiD6EiekB3pIg4oPG7iEuW3y43nHntbDaEMIxSA7+WBv frdeso@raton diff --git a/automation/ansible/roles/common/tasks/main.yml b/automation/ansible/roles/common/tasks/main.yml index 68ac041..1a4895f 100644 --- a/automation/ansible/roles/common/tasks/main.yml +++ b/automation/ansible/roles/common/tasks/main.yml @@ -23,15 +23,8 @@ - name: Set up authorized_keys for the root user authorized_key: user: 'root' - key: '{{ item }}' - with_file: - - public_keys/mjeanson.pub - - public_keys/joraj.pub - - public_keys/jgalar.pub - - public_keys/frdeso.pub - - public_keys/mdesnoyers.pub - - public_keys/smarchi.pub - - public_keys/pproulx.pub + key: "{% for key in query('fileglob', 'public_keys/*.pub') %}{{ lookup('file', key) ~ '\n'}}{% endfor %}" + exclusive: true - name: Remove ubuntu user user: -- 2.34.1