forked from Azure/sap-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-actions-ansible-lint.yml
More file actions
41 lines (34 loc) · 1.36 KB
/
github-actions-ansible-lint.yml
File metadata and controls
41 lines (34 loc) · 1.36 KB
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
34
35
36
37
38
39
40
41
name: Ansible Lint
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Checkout the code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Setup Python
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 #v5.5.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