diff options
author | Nilashish Chakraborty <nilashishchakraborty8@gmail.com> | 2024-06-25 14:54:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-25 14:54:01 +0530 |
commit | b872b6f21d14ff10c221d84217eb568318e9ad8b (patch) | |
tree | 0aacdea877a7e2b209735cd0f7c0b9d62a9446f7 /plugins/modules/vyos_hostname.py | |
parent | 37baff3d4d547911bec1387218edfd477ca79062 (diff) | |
download | vyos.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_hostname.py')
-rw-r--r-- | plugins/modules/vyos_hostname.py | 41 |
1 files changed, 25 insertions, 16 deletions
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": { |