How do you roll out `ansible-lint` profiles across a team without blocking everyone?
IntermediateProductionTesting, CI/CD and Quality
Answer
ansible-lint ships progressive profiles: min, basic, moderate, safety, shared, production. Each one includes the rules of the previous profile. We never jump an existing repo straight to production; we start at the level the code already passes and tighten one step per sprint.
# .ansible-lint
profile: moderate # next quarter: safety, then production
exclude_paths:
- .cache/
- collections/ansible_collections/
offline: true # do not hit Galaxy during lint in CI
New repos start at production from day one. CI runs the same config as developers so there is no "passes on my laptop" argument.
More on Testing, CI/CD and Quality
What does a testing pyramid look like for Ansible code?BeginnerWhen do you use `skip_list`, `warn_list` and `# noqa`?IntermediateHow do you set up pre-commit hooks for an Ansible repo?BeginnerHow is a Molecule scenario laid out, and what does `molecule test` actually run?IntermediateDocker, Podman or real VMs as the Molecule driver: how do you choose?AdvancedHow do you test roles that manage systemd services inside Molecule containers?Advanced