From 6ace7519c115bea6312670d266a0e32182222e09 Mon Sep 17 00:00:00 2001 From: iRaven4522 Date: Sat, 17 Aug 2024 04:54:10 -0500 Subject: [PATCH] streamlining ssh key process --- linux/compliance.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/linux/compliance.yaml b/linux/compliance.yaml index e99b161..828a76a 100644 --- a/linux/compliance.yaml +++ b/linux/compliance.yaml @@ -18,11 +18,10 @@ # Ansible user SSH pub key # This is a really stupid way to do it, but alas. # This uses an environment variable named ansiblesvc_key in Semaphore which has the ssh-rsa pubkey. - - name: Create deployment user .ssh directory. + - name: Add deployment user's SSH key. file: path: /home/ansible/.ssh state: directory - - name: Add deployment user's SSH key. shell: cmd: echo "{{ ansiblesvc_key }}" > /home/ansible/.ssh/authorized_keys creates: /home/ansible/.ssh/authorized_keys @@ -63,11 +62,10 @@ # Sysadmin user SSH pub key # This is a really stupid way to do it, but alas. # This uses an environment variable named nhadmin_key in Semaphore which has the ssh-rsa pubkey. - - name: Create deployment user .ssh directory. + - name: Add nhadmin user's SSH key. file: path: /home/nhadmin/.ssh state: directory - - name: Add nhadmin user's SSH key. shell: cmd: echo "{{ nhadmin_key }}" > /home/nhadmin/.ssh/authorized_keys creates: /home/nhadmin/.ssh/authorized_keys