The ansible-lint action only installs collections from a requirements file it knows about. Since this project uses requirements.yaml instead of the auto-detected requirements.yml, the collections were never installed and the syntax-check rule failed with unresolvable modules. The requirements file is now passed explicitly to the action. Additionally containers.podman is declared as dependency, because the molecule scenario uses containers.podman.podman_container. Co-authored-by: Copilot <copilot@github.com>
22 lines
541 B
YAML
22 lines
541 B
YAML
name: Ansible Linter
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ "opened", "reopened", "synchronize" ]
|
|
push:
|
|
branches: [ '**' ]
|
|
tags-ignore: [ '**' ]
|
|
|
|
jobs:
|
|
ansible-lint:
|
|
runs-on:
|
|
- ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
|
- name: Run ansible-lint
|
|
uses: ansible/ansible-lint@665d9e07a1943254d2910faffc106adaf7ea7294 # v26.8.0
|
|
with:
|
|
args: "--config-file .ansible-lint"
|
|
requirements_file: "requirements.yaml"
|
|
setup_python: "true"
|