File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Static checks for JetBrew (Ansible). Catches YAML/Ansible parse issues before merge.
2+ name : Ansible CI
3+
4+ on :
5+ pull_request :
6+ push :
7+ branches :
8+ - main
9+ - master
10+
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ lint-and-syntax :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+
25+ - name : Set up Python
26+ uses : actions/setup-python@v5
27+ with :
28+ python-version : " 3.12"
29+
30+ - name : Install tools
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install "ansible-core>=2.15,<2.19" yamllint
34+
35+ - name : Yamllint (ansible + utils)
36+ run : yamllint ansible utils
37+
38+ - name : Ansible playbook syntax check
39+ run : |
40+ set -euo pipefail
41+ INV=( -i "localhost," -c local )
42+ VARFILE=( -e "@ansible/group_vars/all.sample.yml" )
43+ check() {
44+ local playbook="$1"
45+ echo "==> ${playbook}"
46+ ansible-playbook "${INV[@]}" --syntax-check "${VARFILE[@]}" "${playbook}"
47+ }
48+ check ansible/main.yml
49+ check ansible/delete-rhoso.yml
50+ check ansible/deploy_external_ceph.yaml
51+ check ansible/provisioning_nodes.yml
52+ check utils/reprovision.yml
Original file line number Diff line number Diff line change 1+ # JetBrew: pragmatic defaults so CI catches YAML syntax errors without
2+ # failing on Ansible/Jinja style that is common in operator repos.
3+ extends: default
4+
5+ ignore: |
6+ **/*.j2
7+
8+ rules:
9+ line-length: disable
10+ document-start: disable
11+ comments: disable
12+ truthy: disable
13+ braces: disable
14+ brackets: disable
15+ empty-lines:
16+ max: 3
17+ max-start: 0
18+ max-end: 2
19+ trailing-spaces: disable
20+ new-line-at-end-of-file: disable
You can’t perform that action at this time.
0 commit comments