From 382e3040c083f1683fd1954b0ba860fab1cda3ce Mon Sep 17 00:00:00 2001 From: iRaven4522 Date: Sun, 28 Apr 2024 19:47:45 -0500 Subject: [PATCH] You can't have two actions in one task --- linux/compliance.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/compliance.yaml b/linux/compliance.yaml index bb05c96..e39dbe5 100644 --- a/linux/compliance.yaml +++ b/linux/compliance.yaml @@ -18,10 +18,11 @@ # 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: Add deployment user's SSH key. + - name: Create deployment user .ssh directory. 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