From 6b26cadb1157999e1be42048a5a1ef10942113dc Mon Sep 17 00:00:00 2001 From: iRaven4522 Date: Sun, 28 Apr 2024 19:46:20 -0500 Subject: [PATCH] Minor service changes, create .ssh directory --- linux/compliance.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linux/compliance.yaml b/linux/compliance.yaml index 1b43785..bb05c96 100644 --- a/linux/compliance.yaml +++ b/linux/compliance.yaml @@ -19,6 +19,9 @@ # 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: Add deployment user's SSH key. + file: + path: /home/ansible/.ssh + state: directory shell: cmd: echo "{{ ansiblesvc_key }}" > /home/ansible/.ssh/authorized_keys creates: /home/ansible/.ssh/authorized_keys @@ -37,7 +40,7 @@ service: name: firewalld state: stopped - enabled: False + enabled: no ignore_errors: True # User account (nhadmin) configuration, for sysadmin use @@ -65,7 +68,7 @@ # Delete our network ansible key from the root user. - name: Delete our network ansible key (and other keys) from the root user. - ansible.builtin.file: + file: path: /root/.ssh/authorized_keys state: absent ignore_errors: yes \ No newline at end of file