diff --git a/.github/workflows/workflow-lint-and-apply-ansible.yml b/.github/workflows/workflow-lint-and-apply-ansible.yml index b5ad4ac8..2e68f7d1 100644 --- a/.github/workflows/workflow-lint-and-apply-ansible.yml +++ b/.github/workflows/workflow-lint-and-apply-ansible.yml @@ -54,5 +54,8 @@ jobs: id: ansible-lint run: ansible-lint -c ${{ github.workspace }}/${{ inputs.ansible-lint-config }} ${{ github.workspace }} + - name: Create the ssh private key file + run: echo '${{ secrets.ANSIBLE_SSH_PRIVATE_KEY }}' > ${{ github.workspace }}/private_key + - name: Run ansible-playbook - run: ansible-playbook -i ${{ github.workspace }}/${{ inputs.ansible-inventory-file }} ${{ github.workspace }}/${{ inputs.ansible-playbook-file }} + run: ansible-playbook --private-key private_key -i ${{ github.workspace }}/${{ inputs.ansible-inventory-file }} ${{ github.workspace }}/${{ inputs.ansible-playbook-file }}