Enabling the debugger in configuration or an environment variable
You can enable the task debugger globally with a setting inansible.cfgor with an environment variable. The only options areTrueorFalse. If you set the configuration option or environment variable toTrue, Ansible runs the debugger on failed tasks by default.
To enable the task debugger fromansible.cfg, add this setting to the[defaults]section:
To enable the task debugger with an environment variable, pass the variable when you run your playbook:
When you enable the debugger globally, every failed task invokes the debugger, unless the role, play, block, or task explicitly disables the debugger. If you need more granular control over what conditions trigger the debugger, use thedebuggerkeyword.