The repository mixed both extensions, the molecule scenario used yml while the role itself used yaml. The yml extension is the one ansible-galaxy and molecule generate and the one the sibling roles use, so it is applied throughout. The first_found lookups in tasks/main.yml name the candidate files explicitly and were adjusted accordingly, otherwise the role would no longer find its distribution variables and its verification tasks. Co-authored-by: Copilot <copilot@github.com>
26 lines
699 B
YAML
26 lines
699 B
YAML
name: Ansible Linter
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ "opened", "reopened", "synchronize" ]
|
|
push:
|
|
branches: [ '**' ]
|
|
tags-ignore: [ '**' ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
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"
|
|
# The molecule scenario is linted as well, so its collections are required beside the ones of the role.
|
|
requirements_file: "molecule/default/collections.yml"
|
|
setup_python: "true"
|