change it
This commit is contained in:
@@ -13,12 +13,13 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run Ansible playbook
|
- name: Run Ansible playbook
|
||||||
uses: docker://alpine/ansible:2.18.6
|
|
||||||
env:
|
env:
|
||||||
ANSIBLE_HOST_KEY_CHECKING: 'false'
|
ANSIBLE_HOST_KEY_CHECKING: 'false'
|
||||||
SSH_KEY: ${{ secrets.ANSIBLE_PRIVATE_KEY }}
|
SSH_KEY: ${{ secrets.ANSIBLE_PRIVATE_KEY }}
|
||||||
BECOME_PASS: ${{ secrets.ANSIBLE_BECOME_PASS }}
|
BECOME_PASS: ${{ secrets.ANSIBLE_BECOME_PASS }}
|
||||||
with:
|
run: |
|
||||||
args: echo ${SSH_KEY} > /mnt/default-key && \
|
apt update && apt install -y ansible && \
|
||||||
echo ${BECOME_PASS} > /mnt/become-pass.txt && \
|
echo ${SSH_KEY} > /mnt/default-key && \
|
||||||
ansible-playbook -i inventory.yml --vault-pass-file /mnt/become-pass.txt --key-file /mnt/default-key playbooks/update-packages.yml
|
echo ${BECOME_PASS} > /mnt/become-pass.txt && \
|
||||||
|
chmod 600 /mnt/default-key && \
|
||||||
|
ansible-playbook -i inventory.yml --vault-pass-file /mnt/become-pass.txt --key-file /mnt/default-key playbooks/update-packages.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user