ansible / ansible-runner

A tool and python library that helps when interfacing with Ansible directly or as part of another system whether that be through a container image interface, as a standalone tool, or as a Python module that can be imported. The goal is to provide a stable and consistent interface abstraction to Ansible.
Other
968 stars 356 forks source link

ansible-runner doesn't support ANSIBLE_ENABLE_TASK_DEBUGGER #1327

Closed fao89 closed 12 months ago

fao89 commented 1 year ago

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_debugger.html#enabling-the-debugger-in-configuration-or-an-environment-variable When I set ANSIBLE_ENABLE_TASK_DEBUGGER=true and execute my playbook with the ansible-runner:

ansible-runner run /runner -p osp.edpm.nova

it gets stuck, and it isn't possible to use the debugger image

If I run the same playbook with ansible-playbook

ansible-playbook -i inventory/hosts osp.edpm.nova

I can see the (debug)> prompt image

sivel commented 1 year ago

I'm curious why you want to have the task debugger enabled when running playbooks through runner.

fao89 commented 1 year ago

@sivel to be honest, I never used the debugger. I bumped into this issue because this var was set to true in a sample and I didn't know why my playbook was getting stuck on error. I could only see it once I ran with ansible-playbook.

Shrews commented 12 months ago

I'm going to close this because using the debugger under runner is not a scenario that is ever going to work because of the need for manual interaction with the debugger itself. Runner does not (nor will it ever) have the ability to process manual interaction with Ansible except for very limited ability to recognize and handle password prompts. If you need to use the debugger, you'll have to run ansible-playbook directly.