summaryrefslogtreecommitdiff
path: root/plugins/modules/vyos_command.py
diff options
context:
space:
mode:
authorNilashish Chakraborty <nilashishchakraborty8@gmail.com>2024-06-25 14:54:01 +0530
committerGitHub <noreply@github.com>2024-06-25 14:54:01 +0530
commitb872b6f21d14ff10c221d84217eb568318e9ad8b (patch)
tree0aacdea877a7e2b209735cd0f7c0b9d62a9446f7 /plugins/modules/vyos_command.py
parent37baff3d4d547911bec1387218edfd477ca79062 (diff)
downloadvyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.tar.gz
vyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.zip
`vyos.vyos` is no longer deprecated! 🎉 (#348)
* Remove deprecation notice for vyos.vyos Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Add changelog Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * chore: auto fixes from pre-commit.com hooks --------- Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'plugins/modules/vyos_command.py')
-rw-r--r--plugins/modules/vyos_command.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/plugins/modules/vyos_command.py b/plugins/modules/vyos_command.py
index 2ed920cb..bacbe26a 100644
--- a/plugins/modules/vyos_command.py
+++ b/plugins/modules/vyos_command.py
@@ -17,6 +17,7 @@
#
from __future__ import absolute_import, division, print_function
+
__metaclass__ = type
@@ -97,26 +98,26 @@ EXAMPLES = """
- name: show configuration on ethernet devices eth0 and eth1
vyos.vyos.vyos_command:
commands:
- - show interfaces ethernet {{ item }}
+ - show interfaces ethernet {{ item }}
with_items:
- - eth0
- - eth1
+ - 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
+ - show version
+ - show hardware cpu
wait_for:
- - result[0] contains 'VyOS 1.1.7'
+ - 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
+ - command: rollback 1
+ prompt: Proceed with reboot? [confirm][y]
+ answer: y
"""
RETURN = """
@@ -164,7 +165,7 @@ def parse_commands(module, warnings):
if not item["command"].startswith("show"):
warnings.append(
"Only show commands are supported when using check mode, not "
- "executing %s" % item["command"]
+ "executing %s" % item["command"],
)
commands.remove(item)