-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document prompt
ability for network/*_command modules
#39201
Comments
Files identified in the description:
If these files are inaccurate, please update the |
In addition:
|
prompt
ability for network/*_command modules
Yes please, would like to see documentation on how multiple prompts can be used. |
I think I have a potential workaround.
|
I tried this with ios_command a few minutes before you posted and it didn't work initially. Then i realized that everyone who had suggested this had put it in quotes and I hadn't. Make sure you try it with quotes. |
Hey all, Re-opening this thread, looking for some help. Running Ansible 2.9.1 root@node-0:~# ansible --version I am trying to remove ‘feature npv’ on a Nexus switch. When running the command ‘no feature npv’ on the switch manually you get the following prompt: Because I am not able to respond this prompt, when I run the ‘no feature npv’ command it times out. Below is my playbook:
Looking at this thread I also tried the following, but it still fails. name: Play 1
I also tried using the nxos_feature module. My yaml file works for other features but does not work when I try enable/disable npv due to the prompt issues. It also looks like I can't use 'prompt' when working with nxos_command. Any ideas? |
This might work for avoiding the user prompt:
|
Thanks @chrisvanheuveln. Unfortunately looks like I still get the prompt. PoD1-N5K-1(config)# term dont-ask |
@sweenig You can use cli_command module that handles single as well as multiple prompts. @robdawg925
Note: The value of the prompt option is a Python regex hence special characters like |
needs_info |
@ganeshrn thanks. That worked! The command get executed on the switch. The only thing is the task in playbook gets a timeout error because the switch reboots write after the command. |
@IPvSean This issue is waiting for your response. Please respond or the issue will be closed. |
@robdawg925 does this help? https://www.ansible.com/blog/rebooting-network-devices-with-ansible use the reset
|
this is a documentation bug, @samccann could we get examples from the blog post into module docs to help close this out? |
ISSUE TYPE
COMPONENT NAME
ios_command
vyos_command
nxos_command
iosxr_command
junos_command
eos_command
ANSIBLE VERSION
N/A
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY
Referring to this thread: #32989
There seems to be an ability to use prompt->
This looks like there is a command level parameter prompt. In the latest dev... I think this is actually documented on ios_command but not the others. We need to show some more examples in the module documentation, and possibly add something to the ansible networking guide as well, as this is a common ask.
STEPS TO REPRODUCE
N/A
EXPECTED RESULTS
N/A
ACTUAL RESULTS
N/A
The text was updated successfully, but these errors were encountered: