-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (21 loc) · 1.09 KB
/
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
name: Ansible Lint # feel free to pick your own name
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: 'echo "$VAULT_PASS" > $GITHUB_WORKSPACE/.vault_pass && printf "[defaults]\n\tvault_password_file = $GITHUB_WORKSPACE/.vault_pass\n" > ansible.cfg && cat ansible.cfg && touch requirements.txt'
shell: bash
env:
VAULT_PASS: ${{secrets.VAULT_PASS}}
- name: Install Ansible
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: 'pip'
- run: pip install ansible-core==2.12.1 ansible-lint==5.2.1 rich~=10.0.0 # https://github.com/ansible-community/ansible-lint/issues/1795
- run: ansible-galaxy install -r ansible/meta/requirements.yml
- run: mkdir -p ~/.ansible/plugins/modules && wget -O ~/.ansible/plugins/modules/gpg.py https://raw.githubusercontent.com/brandonkal/ansible-gpg/master/gpg.py
- run: ansible-lint ansible/playbook.yml