summaryrefslogtreecommitdiff
path: root/plugins/modules/vyos_command.py
diff options
context:
space:
mode:
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)