Use inventory from split Ansible repository
Some checks failed
Ansible Deploy / deploy (push) Failing after 1m0s
Some checks failed
Ansible Deploy / deploy (push) Failing after 1m0s
This commit is contained in:
@@ -1,31 +1,38 @@
|
|||||||
name: Ansible Deploy
|
name: Ansible Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: |
|
run: |
|
||||||
apt -y update
|
apt -y update
|
||||||
apt -y install python3 python3-pip skopeo
|
apt -y install python3 python3-pip skopeo
|
||||||
|
|
||||||
- name: Install Ansible
|
- name: Install Ansible
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip install ansible
|
pip install ansible
|
||||||
|
|
||||||
- name: Set up SSH
|
- name: Set up SSH
|
||||||
uses: webfactory/ssh-agent@v0.5.0
|
uses: webfactory/ssh-agent@v0.5.0
|
||||||
with:
|
with:
|
||||||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Run Ansible Playbook
|
- name: Checkout Ansible inventory
|
||||||
run: |
|
uses: actions/checkout@v3
|
||||||
ansible-playbook -i inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}" SKOPEO_PASS="${{ secrets.SKOPEO_PASS }}"' hatarashi-hako.yaml -vv
|
with:
|
||||||
|
repository: shmick/ansible
|
||||||
|
ref: main # Replace with the branch or tag you want to check out
|
||||||
|
token: ${{ secrets.ANSIBLE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Run Ansible Playbook
|
||||||
|
run: |
|
||||||
|
ansible-playbook -i ansible/inventory.yaml -e 'ANSIBLE_SUDO_PASS="${{ secrets.SUDO_PASS }}" SKOPEO_PASS="${{ secrets.SKOPEO_PASS }}"' hatarashi-hako.yaml -vv
|
||||||
|
|||||||
Reference in New Issue
Block a user