You want a nightly job that runs a safe subset of tasks: health checks only.
BeginnerScenarioPerformance, Testing and CI/CD
Answer
Situation read → Tagged read-only tasks.
What I'd do →
- ansible.builtin.command: df -h /
changed_when: false
tags: [healthcheck, never]
ansible-playbook site.yml --tags healthcheck
Why → The special tag never keeps tasks out of normal runs unless you ask for their other tag.
Interview tip → always runs every time; never runs only if explicitly selected.
More on Performance, Testing and CI/CD
A playbook that touches 200 hosts takes 40 minutes. Where do you start tuning?IntermediateYou install 15 packages with a loop and it is slow.BeginnerHow would you test a role in CI before it reaches production?IntermediateWhat would a Molecule `verify.yml` check for an Nginx role?IntermediateMolecule's idempotence step fails. How do you find the offending task?IntermediateDesign a CI pipeline for an Ansible repo.Advanced