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_hostname.py | 41 ++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'plugins/modules/vyos_hostname.py') diff --git a/plugins/modules/vyos_hostname.py b/plugins/modules/vyos_hostname.py index 46b692a6..bc039b55 100644 --- a/plugins/modules/vyos_hostname.py +++ b/plugins/modules/vyos_hostname.py @@ -10,6 +10,7 @@ The module file for vyos_hostname from __future__ import absolute_import, division, print_function + __metaclass__ = type DOCUMENTATION = """ @@ -73,96 +74,104 @@ options: """ EXAMPLES = """ -# Using state: merged +# Using merged +# # Before state: # ------------- # test#show configuration commands | grep host-name # set system host-name 'vyostest' -# Merged play: -# ------------ + - name: Apply the provided configuration vyos.vyos.vyos_hostname: config: hostname: vyos state: merged + # Commands Fired: # --------------- # "commands": [ # "hostname vyos", # ], +# # After state: # ------------ # test#show configuration commands | grep host-name # set system host-name 'vyos' -# Using state: deleted +# Using deleted +# # Before state: # ------------- # test#show configuration commands | grep host-name # set system host-name 'vyos' -# Deleted play: -# ------------- +# - name: Remove all existing configuration vyos.vyos.vyos_hostname: state: deleted + # Commands Fired: # --------------- # "commands": [ # "no hostname vyosTest", # ], +# # After state: # ------------ # test#show configuration commands | grep host-name -# Using state: overridden +# Using overridden +# # Before state: # ------------- # test#show configuration commands | grep host-name # set system host-name 'vyos' -# Overridden play: -# ---------------- + - name: Override commands with provided configuration vyos.vyos.vyos_hostname: config: hostname: vyosTest state: overridden + # Commands Fired: # --------------- # "commands": [ # "hostname vyosTest", # ], +# # After state: # ------------ # test#show configuration commands | grep host-name # set system host-name 'vyosTest' -# Using state: replaced +# Using replaced +# # Before state: # ------------- # test#show configuration commands | grep host-name # set system host-name 'vyosTest' -# Replaced play: -# -------------- + - name: Replace commands with provided configuration vyos.vyos.vyos_hostname: config: hostname: vyos state: replaced + # After state: # ------------ # test#show configuration commands | grep host-name # set system host-name 'vyos' -# Using state: gathered +# Using gathered +# # Before state: # ------------- -#test#show configuration commands | grep host-name +# test#show configuration commands | grep host-name # set system host-name 'vyos' -# Gathered play: -# -------------- + - name: Gather listed hostname config vyos.vyos.vyos_hostname: state: gathered + # Module Execution Result: # ------------------------ # "gathered": { -- cgit v1.2.3