diff options
author | Sandra McCann <samccann@redhat.com> | 2020-02-05 11:28:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 10:28:44 -0600 |
commit | c8610efa24126bdb65535d1791ed74696d476c8e (patch) | |
tree | e6bfb33993fee244dede39fa0e455dfb1b01c18c /lib | |
parent | aff77f7b0234951275d4d7c5aca56df30c2a982b (diff) | |
download | ansible-c8610efa24126bdb65535d1791ed74696d476c8e.tar.gz |
Network prompts (#66584) (#67054)
* add network prompt examples and module examples
* Update docs/docsite/rst/network/user_guide/network_working_with_command_output.rst
Co-Authored-By: Nathaniel Case <this.is@nathanielca.se>
(cherry picked from commit 68ab8c23be6e363935743bfcc00846c634c66039)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/modules/network/ios/ios_command.py | 1 | ||||
-rw-r--r-- | lib/ansible/modules/network/nxos/nxos_command.py | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/ansible/modules/network/ios/ios_command.py b/lib/ansible/modules/network/ios/ios_command.py index cd7c34ab62..e516a10c07 100644 --- a/lib/ansible/modules/network/ios/ios_command.py +++ b/lib/ansible/modules/network/ios/ios_command.py @@ -111,6 +111,7 @@ tasks: wait_for: - result[0] contains IOS - result[1] contains Loopback0 + - name: run commands that require answering a prompt ios_command: commands: diff --git a/lib/ansible/modules/network/nxos/nxos_command.py b/lib/ansible/modules/network/nxos/nxos_command.py index d207a52831..0975c0d812 100644 --- a/lib/ansible/modules/network/nxos/nxos_command.py +++ b/lib/ansible/modules/network/nxos/nxos_command.py @@ -103,6 +103,15 @@ EXAMPLES = """ commands: - command: show version output: json + +- name: run commands that require answering a prompt + nxos_command: + commands: + - configure terminal + - command: 'no feature npv' + prompt: 'Do you want to continue' + answer: 'y' + """ RETURN = """ |