A task fails with `"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"`
IntermediateTroubleshootingModules, Idempotency and Handlers
Answer
Likely causes → no_log also hides the error message, so you cannot see why the task failed.
Fix → Make no_log switchable for debugging, and run the debug pass only on a safe environment:
no_log: "{{ not (debug_secrets | default(false) | bool) }}"
Then run -e debug_secrets=true -l staging-host. Alternatively, reproduce the call by hand on the host.
Prevent → Put secret-handling tasks in small, separate tasks, so that no_log hides as little as possible. Validate inputs with assert before the sensitive task.
More on Modules, Idempotency and Handlers
`ERROR! The requested handler 'Restart nginx' was not found in either the main handlers list nor in the listening handlers list`BeginnerA handler named `restart {{ app_service }}` is never found when notified as `restart myapp`AdvancedA `command` task reports `changed` on every run, and the Molecule idempotence check failsBeginner`curl ... | tar xz` fails on the host but the `shell` task reports successIntermediate`lineinfile` appends the same line again on every runIntermediate`lineinfile` with `backrefs: true` reports `ok` but the line was never addedIntermediate