Merge pull request #414 from stackhpc/add-interns #1149
This file contains hidden or 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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
ansible-lint: | |
name: Ansible Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Python version must be pinned because of issue with Ubuntu permissions | |
# See https://github.com/actions/runner-images/issues/11499 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Ansible collections | |
run: | | |
ansible-galaxy collection install -r requirements.yml | |
- name: Install pip dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Install ansible-lint | |
run: | | |
pip install ansible-core==2.16.* ansible-lint==24.* | |
- name: Lint Ansible playbooks | |
run: | | |
ansible-lint -v --force-color ansible/*.yml | |
env: | |
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }} |