-
-
Notifications
You must be signed in to change notification settings - Fork 101
68 lines (56 loc) · 1.95 KB
/
linter.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Linter
on:
pull_request:
paths:
- ansible/**
- .ansible-lint
branches:
- master
push:
paths:
- ansible/**
branches:
- master
permissions:
contents: read
jobs:
yamllint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for karancode/yamllint-github-action to post comments on PRs
name: Yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Yamllint'
uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053 # v2.1.1
with:
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ansible_lint:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python 3.x
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.x'
- name: Install dependencies
run: pip install ansible ansible-lint
- name: ansible_lint
run: |
# Ansible code static analysis
ansible-lint
cd ansible
# Check that the inventory is valid
ansible-inventory --host build-marist-rhel79-s390x-1
# Check Playbook syntax.
ansible-playbook playbooks/AdoptOpenJDK_Unix_Playbook/main.yml --syntax-check
ansible-playbook playbooks/AdoptOpenJDK_Unix_Playbook/trss.yml --syntax-check
ansible-playbook playbooks/AdoptOpenJDK_AIX_Playbook/main.yml --syntax-check
ansible-playbook playbooks/AdoptOpenJDK_Windows_Playbook/main.yml --syntax-check
ansible-playbook playbooks/AdoptOpenJDK_Unix_Playbook/ubuntu-jckservices.yml --syntax-check
ansible-playbook playbooks/vagrant.yml --syntax-check
ansible-playbook playbooks/ubuntu-jck.yml --syntax-check