2020-10-01 16:23:22 +08:00
|
|
|
name: ansible-lint
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
2024-02-13 17:53:16 +08:00
|
|
|
python-version: '3.10'
|
2020-10-01 16:23:22 +08:00
|
|
|
architecture: x64
|
2024-02-14 18:14:02 +08:00
|
|
|
- run: pip install -r <(grep ansible tests/requirements.txt) ansible-lint netaddr
|
2022-01-13 23:57:50 +08:00
|
|
|
- run: ansible-galaxy install -r requirements.yml
|
2024-02-14 18:14:02 +08:00
|
|
|
- run: ansible-lint -x 'yaml[line-length],role-name,run-once' -v --force-color ./roles/*/ ./infrastructure-playbooks/*.yml site-container.yml.sample site.yml.sample dashboard.yml
|
|
|
|
- run: ansible-playbook -i ./tests/functional/all_daemons/hosts site.yml.sample site-container.yml.sample dashboard.yml infrastructure-playbooks/*.yml --syntax-check --list-tasks -vv
|