Skip to content

Commit c9a63de

Browse files
committed
run ansible-lint also on examples
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
1 parent 93a3d83 commit c9a63de

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.ansible-lint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ exclude_paths:
55
- sample_*.yml
66
- tests
77
- examples/cloud-init-user-data-example.yml
8+
- examples/hypercore_inventory.yml
89
- .github/workflows
910
- changelogs

.github/workflows/ci-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
- run: ansible-lint
6363
- run: flake8 --exclude tests/output/
6464
- run: ansible-test sanity --local --python 3.10
65+
# Running `ansible-lint` will look at examples as being arbitrary yaml files.
66+
# It will complain about missing space after hash in "#xy" comment.
67+
# Running `ansible-lint examples/*` will interpret files as ansible playbooks.
68+
# Here we need also installed collections used in examples.
69+
- run: ansible-galaxy collection install community.crypto
70+
- run: ansible-lint examples/*
6571

6672
units-test:
6773
runs-on: [ubuntu-latest]

0 commit comments

Comments
 (0)