Enabling the debugger with thedebuggerkeyword
You can use thedebuggerkeyword to enable (or disable) the debugger for a specific play, role, block, or task. This option is especially useful when developing or extending playbooks, plays, and roles. You can enable the debugger on new or updated tasks. If they fail, you can fix the errors efficiently. Thedebuggerkeyword accepts five values:
When you use thedebuggerkeyword, the value you specify overrides any global configuration to enable or disable the debugger. If you definedebuggerat multiple levels, such as in a role and in a task, Ansible honors the most granular definition. The definition at the play or role level applies to all blocks and tasks within that play or role unless they specify a different value. A definition at the block level overrides a definition at the play or role level and applies to all tasks within that block unless they specify a different value. A definition at the task level always applies to the task; it overrides definitions at the block, play, or role level.