ansible/ansible-lint
Runs the moderate ansible-lint profile at recommended and production at all, beside each ansible.cfg or at the scope root.
Part of the ansible configuration, at the recommended level. It runs at the commit stage, once per scope. It runs ansible-lint.
Playbooks run as root on production hosts, and a non-idempotent task changes them each time.
What to do
Section titled “What to do”Change the task the way the rule says. Turn one rule off with gspot ignore ansible/ansible-lint --rule <id> --reason "<why>".
Example
Section titled “Example”A task with ansible.builtin.command: systemctl restart nginx reports command-instead-of-module. Use ansible.builtin.systemd with name: nginx and state: restarted instead.
Turn it off
Section titled “Turn it off”Turn it off for some files, or one of its lint rules, with a reason:
gspot ignore ansible/ansible-lint --paths "<glob>" --reason "<why>"gspot ignore ansible/ansible-lint --rule <rule> --reason "<why>"