https://github.com/disafronov/run-ansible-inventory
GitHub Action to run SOPS-enabled Ansible with inventory directory.
https://github.com/disafronov/run-ansible-inventory
age ansible github-action github-actions inventory sops
Last synced: 3 months ago
JSON representation
GitHub Action to run SOPS-enabled Ansible with inventory directory.
- Host: GitHub
- URL: https://github.com/disafronov/run-ansible-inventory
- Owner: disafronov
- License: apache-2.0
- Created: 2024-02-11T02:45:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-16T12:57:06.000Z (4 months ago)
- Last Synced: 2026-03-17T01:07:32.908Z (4 months ago)
- Topics: age, ansible, github-action, github-actions, inventory, sops
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# run-ansible-inventory
GitHub Action to run SOPS-enabled Ansible with inventory directory.
Example:
```yaml
name: Ansible
"on":
pull_request:
branches: [main]
paths:
- "inventory/**/*"
push:
branches: [main]
paths:
- "inventory/**/*"
jobs:
find-out-changed-inventories:
name: Find out changed inventories
runs-on: ubuntu-latest
outputs:
directories: ${{ steps.changed-files.outputs.directories }}
steps:
- name: Get Ansible changed inventories directories
uses: dmitriysafronov/get-ansible-changed-inventories@v1.1.0
id: changed-files
run-ansible-on-changed-inventories:
name: Ansible
runs-on: ubuntu-latest
strategy:
matrix:
directory: ${{ fromJson(needs.find-out-changed-inventories.outputs.directories) }}
needs:
- find-out-changed-inventories
steps:
- name: Run SOPS-enabled Ansible with inventory directory
uses: dmitriysafronov/run-ansible-inventory@v1.2.2
with:
directory: ${{ matrix.directory }}
ssh-private-key: ${{ secrets.ANSIBLE_SSH_PRIVATE_KEY }}
sops-age-private-key: ${{ secrets.ANSIBLE_SOPS_AGE_KEY }}
pipx-dependencies: ${{ vars.PIPX_DEPENDENCIES }} # optional
```