ansibleansible-awxansible-tower

Interactive Input in AWX/ Ansible Tower


I have a requirement where I need to get the inputs from the user when the playbook is being executed. I used "pause" module and hence was able to get the input from the user during runtime of the playbook which went well on Ansible CLI.

But, when the same playbook was executed on AWX/Ansible Tower, the execution was paused waiting for the input from the user. But, there is no way to pass the input during run-time.

Can I get some help on how to give input on AWX in such case ? If it is not possible, please let me know the alternatives, if any.

Thanks in Advance !!


Solution

  • Regarding your

    requirement where I need to get the inputs from the user when the playbook is being executed.

    this will not be possible during playbook execution. Neither via pause module with parameter prompt, nor via Interactive input: prompts (vars_prompt).

    the execution was paused waiting for the input from the user. But, there is no way to pass the input during run-time.

    Right, as this is the expected behavior. According Ansible Tower Best Pratices

    Playbooks should not use the vars_prompt feature, as Tower does not interactively allow for vars_prompt questions. If you must use vars_prompt, refer to and make use of the Surveys functionality of Tower.