Open
Description
Project Details
- Version: ansible-role-prompt v0.3.0
- Python Version: 3.7.3
- Ansible Version: 2.7.10
- Operating System: macOS
Error on every prompt attempt
The full traceback is:
Traceback (most recent call last):
File "/usr/local/Cellar/ansible/2.7.10/libexec/lib/python3.7/site-packages/ansible/executor/task_executor.py", line 140, in run
res = self._execute()
File "/usr/local/Cellar/ansible/2.7.10/libexec/lib/python3.7/site-packages/ansible/executor/task_executor.py", line 612, in _execute
result = self._handler.run(task_vars=variables)
File "/Users/patricklandolt/.ansible/roles/andrewvaughan.prompt/action_plugins/prompt.py", line 96, in run
return self._prompt(result, args['msg'])
File "/Users/patricklandolt/.ansible/roles/andrewvaughan.prompt/action_plugins/prompt.py", line 210, in _prompt
var = raw_input(askstr)
NameError: name 'raw_input' is not defined
fatal: [staging.radiant.artack.ch]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
I think this is the problem of using python3 as they removed raw_input
(ref: https://www.python.org/dev/peps/pep-3111/)
Metadata
Metadata
Assignees
Labels
No labels
Activity
mx781 commentedon Oct 14, 2020
Doing manual installation as per the plugin's README and then changing
raw_input
toinput
fixes this for Python 3. @andrewvaughan if you're still maintaining this happy to file a PR that makes it cross-compatible.cosaintneal commentedon Mar 24, 2021
Installing via ansible-galaxy, then changing raw_input to input fixes this for Python 3. I agree with @mx781 that this fix would benefit the community, can we make a PR @andrewvaughan?
andrewvaughan commentedon Mar 26, 2021
Hey all - I'm a little tight on time right now (having my first kid!) but I'm still supporting this project. If anyone wishes to submit a PR I'll definitely make sure it gets in.
Support Python3 by replacing `raw_input` with `input`
raw_input
withinput
#85