2020-12-12 08:16:44 +00:00
|
|
|
---
|
|
|
|
# https://github.com/ansible/ansible-lint-action
|
|
|
|
name: Ansible Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '**.yml'
|
|
|
|
- '**.yaml'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ansible-lint:
|
|
|
|
runs-on: ubuntu-latest
|
2020-12-13 23:06:28 +00:00
|
|
|
timeout-minutes: 5
|
2020-12-12 08:16:44 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Git checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Add installed collections in Ansible configuration
|
|
|
|
run: |
|
|
|
|
echo '[defaults]' > ansible.cfg
|
|
|
|
echo 'collections_paths = ./collections' >> ansible.cfg
|
|
|
|
|
2020-12-12 12:51:19 +00:00
|
|
|
- name: Install role requirements
|
2020-12-12 18:16:37 +00:00
|
|
|
run: ansible-galaxy role install -r ansible/roles/requirements.yml
|
2020-12-12 12:51:19 +00:00
|
|
|
|
|
|
|
- name: Install collection requirements
|
2020-12-12 18:16:37 +00:00
|
|
|
run: ansible-galaxy collection install -r ansible/roles/requirements.yml
|
2020-12-12 08:16:44 +00:00
|
|
|
|
|
|
|
- name: Ansible Lint
|
2020-12-13 19:52:44 +00:00
|
|
|
uses: rocky-linux/ansible-lint-action@master
|
2020-12-12 08:16:44 +00:00
|
|
|
with:
|
|
|
|
args: "--exclude .github"
|