Question
Ansible check mode handling of unsupported modules
Cig Nea
0 reputation · 09 Feb 2020, 05:34 UTC
56K views0
Goal: Verify that a playbook executed with ansible-playbook --check produces no changes on the target host even when it contains modules that lack native check_mode support.
Uncertainty: Documentation indicates that modules like shell, command, and raw either run regardless of --check or require an explicit check_mode: no to be honored, and the exact behavior differs between Ansible releases, making it unclear whether a dry‑run can be trusted for safety.
Specific questions:
- Is there a reliable way to force unsupported modules to become no‑ops during a check‑mode run without modifying the playbook logic?
- Does Ansible provide a version‑specific flag or module attribute that guarantees check‑mode safety for all modules?
- Should teams treat any playbook containing unsupported modules as ineligible for
--checkand rely on alternative validation methods instead?