From c5ef3d6a2ee6b4dd3756d799a77e3ab121e1a5c2 Mon Sep 17 00:00:00 2001 From: ikambarov-ec <67379833+ikambarov-ec@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:33:33 -0600 Subject: [PATCH] Fix ssh key permissions --- .github/workflows/workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6004b32..18118e0 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -25,7 +25,9 @@ jobs: /opt/pipx/venvs/ansible-core/bin/python -m pip install boto3 botocore - name: Import SSH Key - run: echo "${{ secrets.ANSIBLE_SSH_KEY }}" > ansible-key + run: | + echo "${{ secrets.ANSIBLE_SSH_KEY }}" > ansible-key + chmod 400 ansible-key - name: Execute Ansible PLaybook run: ansible-playbook -i aws_ec2.yml --private-key=ansible-key main.yml -u centos -b