From b872b6f21d14ff10c221d84217eb568318e9ad8b Mon Sep 17 00:00:00 2001 From: Nilashish Chakraborty Date: Tue, 25 Jun 2024 14:54:01 +0530 Subject: `vyos.vyos` is no longer deprecated! 🎉 (#348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove deprecation notice for vyos.vyos Signed-off-by: NilashishC * Add changelog Signed-off-by: NilashishC * fix review comments Signed-off-by: NilashishC * chore: auto fixes from pre-commit.com hooks --------- Signed-off-by: NilashishC Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- plugins/modules/vyos_command.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'plugins/modules/vyos_command.py') 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) -- cgit v1.2.3