This commit is contained in:
@@ -9,28 +9,11 @@ tags: [shell]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: shell
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Ansible
|
|
||||||
run: |
|
|
||||||
python3 -m pip install --user ansible
|
|
||||||
ansible-galaxy collection install community.docker
|
|
||||||
|
|
||||||
- name: Setup Ansible Vault
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ansible
|
|
||||||
echo "${{ secrets.VAULT_PASSWORD }}" > ~/.ansible/.vault-pass
|
|
||||||
chmod 600 ~/.ansible/.vault-pass
|
|
||||||
|
|
||||||
- name: Setup SSH key
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.ANSIBLE_PRIVATE_KEY }}" > ~/.ssh/ansible
|
|
||||||
chmod 600 ~/.ssh/ansible
|
|
||||||
|
|
||||||
- name: Run Ansible Playbook
|
- name: Run Ansible Playbook
|
||||||
run: ansible-playbook deploy_remote.yml
|
run: ansible-playbook deploy_remote.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user