diff options
author | Rohit <rohitthakur2590@outlook.com> | 2020-06-01 13:05:52 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 07:35:52 +0000 |
commit | 06235439435396c852535c2569542939bf65ef43 (patch) | |
tree | ff9facb3636f13b205bea0d14c7b0c9b12e3f18a /plugins/modules/vyos_command.py | |
parent | 24a6864db07e5f61cdd952a528d4fd6c147d8db4 (diff) | |
download | vyos.vyos-06235439435396c852535c2569542939bf65ef43.tar.gz vyos.vyos-06235439435396c852535c2569542939bf65ef43.zip |
[VyOS: ]all modules updated with FQCN and new doc changes (#33)
[VyOS: ]all modules updated with FQCN and new doc changes
Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'plugins/modules/vyos_command.py')
-rw-r--r-- | plugins/modules/vyos_command.py | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/plugins/modules/vyos_command.py b/plugins/modules/vyos_command.py index 18538491..58e98c99 100644 --- a/plugins/modules/vyos_command.py +++ b/plugins/modules/vyos_command.py @@ -16,14 +16,9 @@ # along with Ansible. If not, see <http://www.gnu.org/licenses/>. # -ANSIBLE_METADATA = { - "metadata_version": "1.1", - "status": ["preview"], - "supported_by": "network", -} - -DOCUMENTATION = """module: vyos_command +DOCUMENTATION = """ +module: vyos_command author: Nathaniel Case (@Qalthos) short_description: Run one or more commands on VyOS devices description: @@ -34,6 +29,7 @@ description: - Certain C(show) commands in VyOS produce many lines of output and use a custom pager that can cause this module to hang. If the value of the environment variable C(ANSIBLE_VYOS_TERMINAL_LENGTH) is not set, the default number of 10000 is used. +version_added: 1.0.0 extends_documentation_fragment: - vyos.vyos.vyos options: @@ -84,29 +80,29 @@ notes: """ EXAMPLES = """ -tasks: - - name: show configuration on ethernet devices eth0 and eth1 - vyos_command: - commands: - - show interfaces ethernet {{ item }} - with_items: - - eth0 - - eth1 - - - name: run multiple commands and check if version output contains specific version string - vyos_command: - commands: - - show version - - show hardware cpu - wait_for: - - "result[0] contains 'VyOS 1.1.7'" - - - name: run command that requires answering a prompt - vyos_command: - commands: - - command: 'rollback 1' - prompt: 'Proceed with reboot? [confirm][y]' - answer: y +- name: show configuration on ethernet devices eth0 and eth1 + vyos.vyos.vyos_command: + commands: + - show interfaces ethernet {{ item }} + with_items: + - eth0 + - eth1 + +- name: run multiple commands and check if version output contains specific version + string + vyos.vyos.vyos_command: + commands: + - show version + - show hardware cpu + wait_for: + - result[0] contains 'VyOS 1.1.7' + +- name: run command that requires answering a prompt + vyos.vyos.vyos_command: + commands: + - command: rollback 1 + prompt: Proceed with reboot? [confirm][y] + answer: y """ RETURN = """ |