Merge pull request #147 from compscidr/renovate/community.general-9.x #760
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # 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 |