diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 18e1a68..07d2766 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,256 +1,274 @@ ============================= Vyos Collection Release Notes ============================= .. contents:: Topics +v2.7.0 +====== + +Major Changes +------------- + +- Add 'pool' as value to server key in ntp_global. + +Minor Changes +------------- + +- Add vyos_snmp_server resource module. + +New Modules +----------- + +- vyos_snmp_server - Manages snmp_server resource module + v2.6.0 ====== Minor Changes ------------- - Add vyos_ntp Resource Module - Adds support for specifying an `afi` for an `address_group` for `vyos.vyos.firewall_global`. As a result, `address_group` now supports IPv6. - Adds support for specifying an `afi` for an `network_group` for `vyos.vyos.firewall_global`. As a result, `network_group` now supports IPv6. Bugfixes -------- - Fix vyos_firewall_rules with state replaced to only replace the specified rules. v2.5.1 ====== Bugfixes -------- - fix issue in firewall rules facts code when IPV6 ICMP type name in vyos.vyos.vyos_firewall_rules is not idempotent v2.5.0 ====== Minor Changes ------------- - vyos_logging_global logging resource module. Deprecated Features ------------------- - The vyos_logging module has been deprecated in favor of the new vyos_logging_global resource module and will be removed in a release after "2023-08-01". Bugfixes -------- - fix issue in route-maps facts code when route-maps facts are empty. v2.4.0 ====== Minor Changes ------------- - Add vyos_prefix_lists Resource Module. New Modules ----------- - vyos_prefix_lists - Prefix-Lists resource module for VyOS v2.3.1 ====== Bugfixes -------- - Fix KeyError 'source' - vyos_firewall_rules - Updated docs resolving spelling typos - change interface to next-hop-interface while generating static_routes nexthop command. v2.3.0 ====== Minor Changes ------------- - Add vyos_route_maps resource module (https://github.com/ansible-collections/vyos.vyos/pull/156.). Bugfixes -------- - change admin_distance to distance while generating static_routes nexthop command. - firewall_global - port-groups were not added (https://github.com/ansible-collections/vyos.vyos/issues/107) New Modules ----------- - vyos_route_maps - Route Map Resource Module. v2.2.0 ====== Minor Changes ------------- - Add support for available_network_resources key, which allows to fetch the available resources for a platform (https://github.com/ansible-collections/vyos.vyos/issues/138). Security Fixes -------------- - Mask values of sensitive keys in module result. v2.1.0 ====== Minor Changes ------------- - Add regex for delete failures to terminal_stderr_re - Add vyos BGP address_family resource module (https://github.com/ansible-collections/vyos.vyos/pull/132). - Enabled addition and parsing of wireguard interface. New Modules ----------- - vyos_bgp_address_family - BGP Address Family Resource Module. v2.0.0 ====== Major Changes ------------- - Please refer to ansible.netcommon `changelog `_ for more details. - Requires ansible.netcommon v2.0.0+ to support `ansible_network_single_user_mode` and `ansible_network_import_modules` - ipaddress is no longer in ansible.netcommon. For Python versions without ipaddress (< 3.0), the ipaddress package is now required. Minor Changes ------------- - Add support for configuration caching (single_user_mode). - Add vyos BGP global resource module.(https://github.com/ansible-collections/vyos.vyos/pull/125). - Re-use device_info dictionary in cliconf. Bugfixes -------- - Update docs to clarify the idemptonecy related caveat and add it in the output warnings (https://github.com/ansible-collections/ansible.netcommon/pull/189) - cliconf plugin - Prevent `get_capabilities()` from getting larger every time it is called New Modules ----------- - vyos_bgp_global - BGP Global Resource Module. v1.1.1 ====== Bugfixes -------- - Add version key to galaxy.yaml to work around ansible-galaxy bug - Enable configuring an interface which is not present in the running config. - vyos_config - Only process src files as commands when they actually contain commands. This fixes an issue were the whitespace preceding a configuration key named 'set' was stripped, tripping up the parser. v1.1.0 ====== Minor Changes ------------- - Added ospf_interfaces resource module. New Modules ----------- - vyos_ospf_interfaces - OSPF Interfaces resource module v1.0.5 ====== Bugfixes -------- - Added openvpn vtu interface support. - Update network integration auth timeout for connection local. - terminal plugin - Overhaul ansi_re to remove more escape sequences v1.0.4 ====== Minor Changes ------------- - Moved intent testcases from integration suite to unit tests. - Reformatted files with latest version of Black (20.8b1). v1.0.3 ====== v1.0.2 ====== Minor Changes ------------- - Fixed the typo in the modulename of ospfv2 and ospfv3 unit tests. - Updated docs. - terminal plugin - Added additional escape sequence to be removed from terminal output. Bugfixes -------- - Added workaround to avoid set_fact dynamically assigning value. This behavior seems to have been broken after ansible2.9. - Make `src`, `backup` and `backup_options` in vyos_config work when module alias is used (https://github.com/ansible-collections/vyos.vyos/pull/67). - vyos_config - fixed issue where config could be saved while in check mode (https://github.com/ansible-collections/vyos.vyos/pull/53) v1.0.1 ====== Minor Changes ------------- - Add doc plugin fixes (https://github.com/ansible-collections/vyos.vyos/pull/51) v1.0.0 ====== New Plugins ----------- Cliconf ~~~~~~~ - vyos - Use vyos cliconf to run command on VyOS platform New Modules ----------- - vyos_banner - Manage multiline banners on VyOS devices - vyos_command - Run one or more commands on VyOS devices - vyos_config - Manage VyOS configuration on remote device - vyos_facts - Get facts about vyos devices. - vyos_firewall_global - FIREWALL global resource module - vyos_firewall_interfaces - FIREWALL interfaces resource module - vyos_firewall_rules - FIREWALL rules resource module - vyos_interface - (deprecated, removed after 2022-06-01) Manage Interface on VyOS network devices - vyos_interfaces - Interfaces resource module - vyos_l3_interface - (deprecated, removed after 2022-06-01) Manage L3 interfaces on VyOS network devices - vyos_l3_interfaces - L3 interfaces resource module - vyos_lag_interfaces - LAG interfaces resource module - vyos_linkagg - (deprecated, removed after 2022-06-01) Manage link aggregation groups on VyOS network devices - vyos_lldp - (deprecated, removed after 2022-06-01) Manage LLDP configuration on VyOS network devices - vyos_lldp_global - LLDP global resource module - vyos_lldp_interface - (deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on VyOS network devices - vyos_lldp_interfaces - LLDP interfaces resource module - vyos_logging - Manage logging on network devices - vyos_ospfv2 - OSPFv2 resource module - vyos_ospfv3 - OSPFV3 resource module - vyos_ping - Tests reachability using ping from VyOS network devices - vyos_static_route - (deprecated, removed after 2022-06-01) Manage static IP routes on Vyatta VyOS network devices - vyos_static_routes - Static routes resource module - vyos_system - Run `set system` commands on VyOS devices - vyos_user - Manage the collection of local users on VyOS device - vyos_vlan - Manage VLANs on VyOS network devices diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 4e76489..bcc7e21 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,318 +1,334 @@ ancestor: null releases: 1.0.0: modules: - description: Manage multiline banners on VyOS devices name: vyos_banner namespace: '' - description: Run one or more commands on VyOS devices name: vyos_command namespace: '' - description: Manage VyOS configuration on remote device name: vyos_config namespace: '' - description: Get facts about vyos devices. name: vyos_facts namespace: '' - description: FIREWALL global resource module name: vyos_firewall_global namespace: '' - description: FIREWALL interfaces resource module name: vyos_firewall_interfaces namespace: '' - description: FIREWALL rules resource module name: vyos_firewall_rules namespace: '' - description: (deprecated, removed after 2022-06-01) Manage Interface on VyOS network devices name: vyos_interface namespace: '' - description: Interfaces resource module name: vyos_interfaces namespace: '' - description: (deprecated, removed after 2022-06-01) Manage L3 interfaces on VyOS network devices name: vyos_l3_interface namespace: '' - description: L3 interfaces resource module name: vyos_l3_interfaces namespace: '' - description: LAG interfaces resource module name: vyos_lag_interfaces namespace: '' - description: (deprecated, removed after 2022-06-01) Manage link aggregation groups on VyOS network devices name: vyos_linkagg namespace: '' - description: (deprecated, removed after 2022-06-01) Manage LLDP configuration on VyOS network devices name: vyos_lldp namespace: '' - description: LLDP global resource module name: vyos_lldp_global namespace: '' - description: (deprecated, removed after 2022-06-01) Manage LLDP interfaces configuration on VyOS network devices name: vyos_lldp_interface namespace: '' - description: LLDP interfaces resource module name: vyos_lldp_interfaces namespace: '' - description: Manage logging on network devices name: vyos_logging namespace: '' - description: OSPFv2 resource module name: vyos_ospfv2 namespace: '' - description: OSPFV3 resource module name: vyos_ospfv3 namespace: '' - description: Tests reachability using ping from VyOS network devices name: vyos_ping namespace: '' - description: (deprecated, removed after 2022-06-01) Manage static IP routes on Vyatta VyOS network devices name: vyos_static_route namespace: '' - description: Static routes resource module name: vyos_static_routes namespace: '' - description: Run `set system` commands on VyOS devices name: vyos_system namespace: '' - description: Manage the collection of local users on VyOS device name: vyos_user namespace: '' - description: Manage VLANs on VyOS network devices name: vyos_vlan namespace: '' plugins: cliconf: - description: Use vyos cliconf to run command on VyOS platform name: vyos namespace: null release_date: '2020-06-23' 1.0.1: changes: minor_changes: - Add doc plugin fixes (https://github.com/ansible-collections/vyos.vyos/pull/51) fragments: - 51-doc-plugin-fixes.yaml release_date: '2020-06-23' 1.0.2: changes: bugfixes: - Added workaround to avoid set_fact dynamically assigning value. This behavior seems to have been broken after ansible2.9. - Make `src`, `backup` and `backup_options` in vyos_config work when module alias is used (https://github.com/ansible-collections/vyos.vyos/pull/67). - vyos_config - fixed issue where config could be saved while in check mode (https://github.com/ansible-collections/vyos.vyos/pull/53) minor_changes: - Fixed the typo in the modulename of ospfv2 and ospfv3 unit tests. - Updated docs. - terminal plugin - Added additional escape sequence to be removed from terminal output. fragments: - 65-remove-unwanted-terminal-chars.yaml - 70-workaround-set_fact.yaml - 72-modulename-typofix.yaml - 73-update-docs.yaml - fix_src_backup_with_module_alias.yaml - prevent-vyos_config-saving-in-check-mode.yaml release_date: '2020-07-31' 1.0.3: fragments: - 1.0.3.yaml release_date: '2020-08-06' 1.0.4: changes: minor_changes: - Moved intent testcases from integration suite to unit tests. - Reformatted files with latest version of Black (20.8b1). fragments: - 71-refactor-interface-test.yaml - 80-reformat-files.yaml release_date: '2020-08-27' 1.0.5: changes: bugfixes: - Added openvpn vtu interface support. - Update network integration auth timeout for connection local. - terminal plugin - Overhaul ansi_re to remove more escape sequences fragments: - 86-openvpn_vtu_interface.yaml - local_auth_timeout.yaml - terminal-escape-codes.yaml release_date: '2020-10-08' 1.1.0: changes: minor_changes: - Added ospf_interfaces resource module. fragments: - vyos_ospf_interfaces_rm.yaml modules: - description: OSPF Interfaces resource module name: vyos_ospf_interfaces namespace: '' release_date: '2020-10-30' 1.1.1: changes: bugfixes: - Add version key to galaxy.yaml to work around ansible-galaxy bug - Enable configuring an interface which is not present in the running config. - vyos_config - Only process src files as commands when they actually contain commands. This fixes an issue were the whitespace preceding a configuration key named 'set' was stripped, tripping up the parser. fragments: - 91-new-interface.yaml - config-processed-as-command.yaml - galaxy-version.yaml release_date: '2021-01-27' 2.0.0: changes: bugfixes: - Update docs to clarify the idemptonecy related caveat and add it in the output warnings (https://github.com/ansible-collections/ansible.netcommon/pull/189) - cliconf plugin - Prevent `get_capabilities()` from getting larger every time it is called major_changes: - Please refer to ansible.netcommon `changelog `_ for more details. - Requires ansible.netcommon v2.0.0+ to support `ansible_network_single_user_mode` and `ansible_network_import_modules` - ipaddress is no longer in ansible.netcommon. For Python versions without ipaddress (< 3.0), the ipaddress package is now required. minor_changes: - Add support for configuration caching (single_user_mode). - Add vyos BGP global resource module.(https://github.com/ansible-collections/vyos.vyos/pull/125). - Re-use device_info dictionary in cliconf. fragments: - 120-remove-ipaddress.yaml - 122-rpc-unbloat.yaml - bgp_global_resource_module.yaml - fix_docker_sanity_test_failures.yaml - major_release_2.0.0.yaml - modify_resource_module_class_import.yaml - single_user_mode.yaml - vyos_config_diff_doc_update.yaml modules: - description: BGP Global Resource Module. name: vyos_bgp_global namespace: '' release_date: '2021-02-24' 2.1.0: changes: minor_changes: - Add regex for delete failures to terminal_stderr_re - Add vyos BGP address_family resource module (https://github.com/ansible-collections/vyos.vyos/pull/132). - Enabled addition and parsing of wireguard interface. fragments: - 128-remove_tests_sanity_requirements.yml - 132-add-vyos-bgp-address-family.yml - parse_wireguard_interface.yml - replace-check_required.yaml - skip_no_log_sanity_error.yaml - terminal_stderr_delete.yml modules: - description: BGP Address Family Resource Module. name: vyos_bgp_address_family namespace: '' release_date: '2021-03-30' 2.2.0: changes: minor_changes: - Add support for available_network_resources key, which allows to fetch the available resources for a platform (https://github.com/ansible-collections/vyos.vyos/issues/138). security_fixes: - Mask values of sensitive keys in module result. fragments: - 147-add_ignore_txt.yml - 160_available_network_resources.yaml - no_log_mask.yaml - remove-old-test-deps.yml release_date: '2021-04-27' 2.3.0: changes: bugfixes: - change admin_distance to distance while generating static_routes nexthop command. - firewall_global - port-groups were not added (https://github.com/ansible-collections/vyos.vyos/issues/107) minor_changes: - Add vyos_route_maps resource module (https://github.com/ansible-collections/vyos.vyos/pull/156.). fragments: - changelog_doc_path_update.yaml - fix_delete_route_maps.yaml - fix_port_groups.yaml - fix_static_routes_distance.yaml - vyos-route-maps.yaml modules: - description: Route Map Resource Module. name: vyos_route_maps namespace: '' release_date: '2021-05-18' 2.3.1: changes: bugfixes: - Fix KeyError 'source' - vyos_firewall_rules - Updated docs resolving spelling typos - change interface to next-hop-interface while generating static_routes nexthop command. fragments: - 172-fix-source-keyerror-firewallrules.yml - docs_common_error_correction.yaml - fix_static_routes_next_hop_interface.yaml - update_readme_freenode_to_liberachat.yml release_date: '2021-06-22' 2.4.0: changes: minor_changes: - Add vyos_prefix_lists Resource Module. fragments: - vyos_prefix_lists.yml modules: - description: Prefix-Lists resource module for VyOS name: vyos_prefix_lists namespace: '' release_date: '2021-07-06' 2.5.0: changes: bugfixes: - fix issue in route-maps facts code when route-maps facts are empty. deprecated_features: - The vyos_logging module has been deprecated in favor of the new vyos_logging_global resource module and will be removed in a release after "2023-08-01". minor_changes: - vyos_logging_global logging resource module. fragments: - fix_issue_vyos_facts.yaml - vyos_logging_global_module.yaml release_date: '2021-07-26' 2.5.1: changes: bugfixes: - fix issue in firewall rules facts code when IPV6 ICMP type name in vyos.vyos.vyos_firewall_rules is not idempotent fragments: - doc_updated_correct_platform.yaml - fix_issue170_vyos_firewall_rules.yaml - fix_pylint_issues.yaml - tests_become.yaml release_date: '2021-08-27' 2.6.0: changes: bugfixes: - Fix vyos_firewall_rules with state replaced to only replace the specified rules. minor_changes: - Add vyos_ntp Resource Module - Adds support for specifying an `afi` for an `address_group` for `vyos.vyos.firewall_global`. As a result, `address_group` now supports IPv6. - Adds support for specifying an `afi` for an `network_group` for `vyos.vyos.firewall_global`. As a result, `network_group` now supports IPv6. fragments: - 0-copy_ignore_txt.yml - fix-firewall_rules-state-replaced.yaml - set_allow_duplicates.yaml - support_ipv6_address_and_network_groups.yaml - vyos_ntp.yml release_date: '2021-10-02' + 2.7.0: + changes: + major_changes: + - Add 'pool' as value to server key in ntp_global. + minor_changes: + - Add vyos_snmp_server resource module. + fragments: + - add_snmp_server_resource_module.yaml + - ntp_server_add_pool.yaml + - remove-swap-file.yml + - sanity_issue_fix.yaml + modules: + - description: Manages snmp_server resource module + name: vyos_snmp_server + namespace: '' + release_date: '2022-01-31' diff --git a/changelogs/fragments/add_snmp_server_resource_module.yaml b/changelogs/fragments/add_snmp_server_resource_module.yaml deleted file mode 100644 index 8a22439..0000000 --- a/changelogs/fragments/add_snmp_server_resource_module.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - Add vyos_snmp_server resource module. diff --git a/changelogs/fragments/ntp_server_add_pool.yaml b/changelogs/fragments/ntp_server_add_pool.yaml deleted file mode 100644 index a6c2b48..0000000 --- a/changelogs/fragments/ntp_server_add_pool.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -major_changes: - - Add 'pool' as value to server key in ntp_global. diff --git a/changelogs/fragments/remove-swap-file.yml b/changelogs/fragments/remove-swap-file.yml deleted file mode 100644 index 10e2b1d..0000000 --- a/changelogs/fragments/remove-swap-file.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: - - Removed unintended file tests/unit/modules/network/vyos/.test_vyos_firewall_rules.py.swp diff --git a/changelogs/fragments/sanity_issue_fix.yaml b/changelogs/fragments/sanity_issue_fix.yaml deleted file mode 100644 index 60bb3d2..0000000 --- a/changelogs/fragments/sanity_issue_fix.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: - - Add libssh dependency and fix doc issues. diff --git a/docs/vyos.vyos.vyos_ntp_global_module.rst b/docs/vyos.vyos.vyos_ntp_global_module.rst index 18f0ece..aea39b1 100644 --- a/docs/vyos.vyos.vyos_ntp_global_module.rst +++ b/docs/vyos.vyos.vyos_ntp_global_module.rst @@ -1,977 +1,977 @@ .. _vyos.vyos.vyos_ntp_global_module: ************************* vyos.vyos.vyos_ntp_global ************************* **Manages ntp modules of Vyos network devices** Version added: 2.4.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module manages ntp configuration on devices running Vyos Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
dictionary
List of configurations for ntp module
allow_clients
list / elements=string
Network Time Protocol (NTP) server options
listen_addresses
list / elements=string
local IP addresses for service to listen on
servers
list / elements=dictionary
Network Time Protocol (NTP) server
options
list / elements=string
    Choices:
  • noselect
  • dynamic
  • +
  • pool
  • preempt
  • prefer
  • -
  • pool
server options for NTP
server
string
server name for NTP
running_config
string
This option is used only with state parsed.
The value of this option should be the output received from the VYOS device by executing the command show configuration commands | grep ntp.
The states replaced and overridden have identical behaviour for this module.
The state parsed reads the configuration from show configuration commands | grep ntp option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
state
string
    Choices:
  • deleted
  • merged ←
  • overridden
  • replaced
  • gathered
  • rendered
  • parsed
The state the configuration should be left in.

Notes ----- .. note:: - Tested against vyos 1.3 - This module works with connection ``network_cli``. Examples -------- .. code-block:: yaml # # ------------------- # # 1. Using merged # # ------------------- # # Before state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # Task # # ------------- - name: Replace the existing ntp config with the new config vyos.vyos.vyos_ntp_global: config: allow_clients: - 10.6.6.0/24 listen_addresses: - 10.1.3.1 servers: - server: 203.0.113.0 options: - prefer # # Task output: # # ------------- # "after": { # "allow_clients": [ # "10.6.6.0/24" # ], # "listen_addresses": [ # "10.1.3.1" # ], # "servers": [ # { # "server": "ser", # "options": [ # "prefer" # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "before": { # }, # "changed": true, # "commands": [ # "set system ntp allow-clients address 10.6.6.0/24", # "set system ntp listen-address 10.1.3.1", # "set system ntp server 203.0.113.0 prefer" # ] # After state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.6.6.0/24' # set system ntp listen-address '10.1.3.1' # set system ntp server 203.0.113.0 prefer, # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # ------------------- # # 2. Using replaced # # ------------------- # # Before state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.4.9.0/24' # set system ntp allow-clients address '10.4.7.0/24' # set system ntp allow-clients address '10.1.2.0/24' # set system ntp allow-clients address '10.2.3.0/24' # set system ntp listen-address '10.1.9.16' # set system ntp listen-address '10.5.3.2' # set system ntp listen-address '10.7.9.21' # set system ntp listen-address '10.8.9.4' # set system ntp listen-address '10.4.5.1' # set system ntp server 10.3.6.5 noselect # set system ntp server 10.3.6.5 dynamic # set system ntp server 10.3.6.5 preempt # set system ntp server 10.3.6.5 prefer # set system ntp server server4 noselect # set system ntp server server4 dynamic # set system ntp server server5 # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # Task # # ------------- - name: Replace the existing ntp config with the new config vyos.vyos.vyos_ntp_global: config: allow_clients: - 10.6.6.0/24 listen_addresses: - 10.1.3.1 servers: - server: 203.0.113.0 options: - prefer state: replaced # # Task output: # # ------------- # "after": { # "allow_clients": [ # "10.6.6.0/24" # ], # "listen_addresses": [ # "10.1.3.1" # ], # "servers": [ # { # "server": "ser", # "options": [ # "prefer" # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "before": { # "allow_clients": [ # "10.4.7.0/24", # "10.2.3.0/24", # "10.1.2.0/24", # "10.4.9.0/24" # ], # "listen_addresses": [ # "10.7.9.21", # "10.4.5.1", # "10.5.3.2", # "10.8.9.4", # "10.1.9.16" # ], # "servers": [ # { # "server": "10.3.6.5", # "options": [ # "noselect", # "dynamic", # "preempt", # "prefer" # ] # }, # { # "server": "server4", # "options": [ # "noselect", # "dynamic" # ] # }, # { # "server": "server5" # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "changed": true, # "commands": [ # "delete system ntp allow-clients address 10.4.7.0/24", # "delete system ntp allow-clients address 10.2.3.0/24", # "delete system ntp allow-clients address 10.1.2.0/24", # "delete system ntp allow-clients address 10.4.9.0/24", # "delete system ntp listen-address 10.7.9.21", # "delete system ntp listen-address 10.4.5.1", # "delete system ntp listen-address 10.5.3.2", # "delete system ntp listen-address 10.8.9.4", # "delete system ntp listen-address 10.1.9.16", # "delete system ntp server 10.3.6.5", # "delete system ntp server server4", # "delete system ntp server server5", # "set system ntp allow-clients address 10.6.6.0/24", # "set system ntp listen-address 10.1.3.1", # "set system ntp server 203.0.113.0 prefer" # ] # After state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.6.6.0/24' # set system ntp listen-address '10.1.3.1' # set system ntp server 203.0.113.0 prefer, # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # ------------------- # # 3. Using overridden # # ------------------- # # Before state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.6.6.0/24' # set system ntp listen-address '10.1.3.1' # set system ntp server 203.0.113.0 prefer, # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # Task # # ------------- - name: Override ntp config vyos.vyos.vyos_ntp_global: config: allow_clients: - 10.3.3.0/24 listen_addresses: - 10.7.8.1 servers: - server: server1 options: - dynamic - prefer - server: server2 options: - noselect - preempt - server: serv state: overridden # # Task output: # # ------------- # "after": { # "allow_clients": [ # "10.3.3.0/24" # ], # "listen_addresses": [ # "10.7.8.1" # ], # "servers": [ # { # "server": "serv" # }, # { # "server": "server1", # "options": [ # "dynamic", # "prefer" # ] # }, # { # "server": "server2", # "options": [ # "noselect", # "preempt" # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "before": { # "allow_clients": [ # "10.6.6.0/24" # ], # "listen_addresses": [ # "10.1.3.1" # ], # "servers": [ # { # "server": "ser", # "options": [ # "prefer" # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "changed": true, # "commands": [ # "delete system ntp allow-clients address 10.6.6.0/24", # "delete system ntp listen-address 10.1.3.1", # "delete system ntp server ser", # "set system ntp allow-clients address 10.3.3.0/24", # "set system ntp listen-address 10.7.8.1", # "set system ntp server server1 dynamic", # "set system ntp server server1 prefer", # "set system ntp server server2 noselect", # "set system ntp server server2 preempt", # "set system ntp server serv" # ] # After state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.3.3.0/24' # set system ntp listen-address '10.7.8.1' # set system ntp server serv # set system ntp server server1 dynamic # set system ntp server server1 prefer # set system ntp server server2 noselect # set system ntp server server2 preempt # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # ------------------- # # 4. Using gathered # # ------------------- # # Before state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.3.3.0/24' # set system ntp listen-address '10.7.8.1' # set system ntp server serv # set system ntp server server1 dynamic # set system ntp server server1 prefer # set system ntp server server2 noselect # set system ntp server server2 preempt # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # Task # # ------------- - name: Gather ntp config vyos.vyos.vyos_ntp_global: state: gathered # # Task output: # # ------------- # "gathered": { # "allow_clients": [ # "10.3.3.0/24" # ], # "listen_addresses": [ # "10.7.8.1" # ], # "servers": [ # { # "server": "serv" # }, # { # "server": "server1", # "options": [ # "dynamic", # "prefer" # ] # }, # { # "server": "server2", # "options": [ # "noselect", # "preempt" # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # } # After state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.3.3.0/24' # set system ntp listen-address '10.7.8.1' # set system ntp server serv # set system ntp server server1 dynamic # set system ntp server server1 prefer # set system ntp server server2 noselect # set system ntp server server2 preempt # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # ------------------- # # 5. Using deleted # # ------------------- # # Before state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp allow-clients address '10.3.3.0/24' # set system ntp listen-address '10.7.8.1' # set system ntp server serv # set system ntp server server1 dynamic # set system ntp server server1 prefer # set system ntp server server2 noselect # set system ntp server server2 preempt # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # Task # # ------------- - name: Delete ntp config vyos.vyos.vyos_ntp_global: state: deleted # # Task output: # # ------------- # "after": { # "servers": [ # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "before": { # "allow_clients": [ # "10.3.3.0/24" # ], # "listen_addresses": [ # "10.7.8.1" # ], # "servers": [ # { # "server": "serv" # }, # { # "server": "server1", # "options": [ # "dynamic", # "prefer" # ] # }, # { # "server": "server2", # "options": [ # "noselect", # "preempt" # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # ] # }, # "changed": true, # "commands": [ # "delete system ntp allow-clients", # "delete system ntp listen-address", # "delete system ntp server serv", # "delete system ntp server server1", # "delete system ntp server server2" # # ] # After state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # ------------------- # # 6. Using rendered # # ------------------- # # Before state: # # ------------- # vyos@vyos:~$ show configuration commands | grep ntp # set system ntp server time1.vyos.net # set system ntp server time2.vyos.net # set system ntp server time3.vyos.net # vyos@vyos:~$ # # Task # # ------------- - name: Render ntp config vyos.vyos.vyos_ntp_global: config: allow_clients: - 10.7.7.0/24 - 10.8.8.0/24 listen_addresses: - 10.7.9.1 servers: - server: server7 - server: server45 options: - noselect - prefer - pool - server: time1.vyos.net - server: time2.vyos.net - server: time3.vyos.net state: rendered # # Task output: # # ------------- # "rendered": [ # "set system ntp allow-clients address 10.7.7.0/24", # "set system ntp allow-clients address 10.8.8.0/24", # "set system ntp listen-address 10.7.9.1", # "set system ntp server server7", # "set system ntp server server45 noselect", # "set system ntp server server45 prefer", # "set system ntp server server45 pool", # "set system ntp server time1.vyos.net", # "set system ntp server time2.vyos.net", # "set system ntp server time3.vyos.net" # ] # # ------------------- # # 7. Using parsed # # ------------------- # # sample_config.cfg: # # ------------- # "set system ntp allow-clients address 10.7.7.0/24", # "set system ntp listen-address 10.7.9.1", # "set system ntp server server45 noselect", # "set system ntp allow-clients addres 10.8.6.0/24", # "set system ntp listen-address 10.5.4.1", # "set system ntp server server45 dynamic", # "set system ntp server time1.vyos.net", # "set system ntp server time2.vyos.net", # "set system ntp server time3.vyos.net" # # Task: # # ------------- - name: Parse externally provided ntp configuration vyos.vyos.vyos_ntp_global: running_config: "{{ lookup('file', './sample_config.cfg') }}" state: parsed # # Task output: # # ------------- # parsed = { # "allow_clients": [ # "10.7.7.0/24", # "10.8.6.0/24 # ], # "listen_addresses": [ # "10.5.4.1", # "10.7.9.1" # ], # "servers": [ # { # "server": "server45", # "options": [ # "noselect", # "dynamic" # # ] # }, # { # "server": "time1.vyos.net" # }, # { # "server": "time2.vyos.net" # }, # { # "server": "time3.vyos.net" # } # # ] # } Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
dictionary
when changed
The resulting configuration after module execution.

Sample:
This output will always be in the same format as the module argspec.
before
dictionary
when state is merged, replaced, overridden, deleted or purged
The configuration prior to the module execution.

Sample:
This output will always be in the same format as the module argspec.
commands
list
when state is merged, replaced, overridden, deleted or purged
The set of commands pushed to the remote device.

Sample:
['set system ntp server server1 dynamic', 'set system ntp server server1 prefer', 'set system ntp server server2 noselect', 'set system ntp server server2 preempt', 'set system ntp server server_add preempt']
gathered
list
when state is gathered
Facts about the network resource gathered from the remote device as structured data.

Sample:
This output will always be in the same format as the module argspec.
parsed
list
when state is parsed
The device native config provided in running_config option parsed into structured data as per module argspec.

Sample:
This output will always be in the same format as the module argspec.
rendered
list
when state is rendered
The provided configuration in the task rendered in device-native format (offline).

Sample:
['set system ntp server server1 dynamic', 'set system ntp server server1 prefer', 'set system ntp server server2 noselect', 'set system ntp server server2 preempt', 'set system ntp server server_add preempt']


Status ------ Authors ~~~~~~~ - Varshitha Yataluru (@YVarshitha)