-
Notifications
You must be signed in to change notification settings - Fork 142
33 lines (28 loc) · 1.16 KB
/
github-actions-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
33
name: Ansible Lint
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 #v5.2.0
with:
python-version: '3.x'
- name: Install Ansible and Ansible-Lint
run: |
python -m pip install --upgrade pip
pip install ansible-core ansible-lint==24.7.0 jmespath netaddr
- name: Install Ansible Collections
run: |
ansible-galaxy collection install ansible.windows --force
ansible-galaxy collection install ansible.posix --force
ansible-galaxy collection install ansible.utils --force
ansible-galaxy collection install ansible.netcommon:5.1.2 --force
ansible-galaxy collection install community.windows --force
ansible-galaxy collection install community.general --force
ansible-galaxy collection install microsoft.ad --force
- name: Run ansible-lint
run: |
ansible-lint deploy/ansible -c .ansible-lint