Use Ansible 13 #97
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: | |
| - master | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build: | |
| env: | |
| ANSIBLE_FORCE_COLOR: 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ['3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Show environment | |
| run: | | |
| ansible --version | |
| yamllint --version | |
| flake8 --version | |
| ansible-lint --version | |
| # checks before external roles | |
| - name: Test with yamllint | |
| run: | | |
| yamllint . | |
| - name: Test with flake8 | |
| run: | | |
| flake8 . | |
| - name: Install Ansible collections and roles | |
| run: | | |
| ansible-galaxy collection install -r requirements.yml | |
| ansible-galaxy role install -r requirements.yml -p .external_roles | |
| - name: Run Ansible lint | |
| run: | | |
| ansible-lint playbooks | |
| - name: Remove secrets | |
| run: | | |
| find . -name '*.vault.*' -delete | |
| - name: Check syntax | |
| run: | | |
| find playbooks/ -maxdepth 1 -name '*.yml' | xargs -n 1 ansible-playbook --syntax-check |