-
Notifications
You must be signed in to change notification settings - Fork 19
32 lines (30 loc) · 1.16 KB
/
ansible-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Ansible linting
on:
push:
branches:
- main
- master
pull_request:
jobs:
# Runs a syntax check only for the playbooks
syntax-basic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Syntax check playbooks
run: |
pip3 install --user ansible
ansible-playbook -i hosts --syntax-check --list-tasks *.yml
# Runs a syntax check for all maangement and router combinations
syntax-all:
runs-on: ubuntu-latest
strategy:
matrix:
management: ["althea-dev.yml", "althea-packages.yml", "althea-release.yml", "hawk-managed.yml"]
router: ["x86_64.yml", "nanopi-r2s.yml", "wrt3200acm.yml", "wrt32x.yml", "wrt1900acs.yml", "dl-wrtx36.yml", "glb1300.yml", "ea6350v3.yml", "mr8300.yml", "ea8300.yml", "mikrotik_hap-ac2.yml", "mikrotik_hap-ac3.yml", "netgear_ex6100v2.yml", "pi4-64.yml"]
steps:
- uses: actions/checkout@v2
- name: Syntax check playbooks
run: |
pip3 install --user ansible
ansible-playbook -i hosts --syntax-check -e @profiles/devices/${{matrix.router}} -e @profiles/management/${{matrix.management}} --list-tasks *.yml