Skip to content

Commit 6316f5b

Browse files
committed
feat: add ansible-playbook syntax-check
1 parent 24be30d commit 6316f5b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,12 @@ jobs:
367367
- name: Run ansible-lint for Ansible playbook
368368
if: steps.check_ansible_playbook.outputs.files_exists == 'true'
369369
run: |
370-
find . -maxdepth 1 -name "*.yml" -not -name "requirements.yml" | xargs -n1 ansible-lint --strict --force-color
370+
find . -maxdepth 1 -name "*.yml" -not -name "requirements.yml" -not -name "hosts.yml" | xargs -n1 ansible-lint --strict --force-color
371+
372+
- name: Run ansible-playbook syntax-check for Ansible playbook
373+
if: steps.check_ansible_playbook.outputs.files_exists == 'true'
374+
run: |
375+
find . -maxdepth 1 -name "*.yml" -not -name "requirements.yml" -not -name "hosts.yml" | xargs -n1 ansible-playbook --inventory="hosts.yml" --syntax-check
371376
372377
- name: Check for Molecule files
373378
id: check_molecule

0 commit comments

Comments
 (0)