pez-infra/.github/workflows/lint-ansible.yml
Rasmus "Pez" Wejlgaard b16f89357b
replace hard set ip with vars (#25)
* replace hard set ip with vars

* run all PR checks every time
2026-03-29 21:33:50 +01:00

27 lines
685 B
YAML

name: Lint Ansible
on:
pull_request:
jobs:
ansible-lint:
name: ansible-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for Ansible files
id: check
run: |
if find ansible/ -name '*.yml' -o -name '*.yaml' | grep -q .; then
echo "has_files=true" >> "$GITHUB_OUTPUT"
else
echo "has_files=false" >> "$GITHUB_OUTPUT"
echo "No Ansible YAML files found — skipping lint."
fi
- name: Run ansible-lint
if: steps.check.outputs.has_files == 'true'
uses: ansible/ansible-lint@v25
with:
working_directory: ansible/