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 /docs | |
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 'docs')
26 files changed, 1327 insertions, 1321 deletions
diff --git a/docs/vyos.vyos.vyos_bgp_address_family_module.rst b/docs/vyos.vyos.vyos_bgp_address_family_module.rst index a213ff0..f860ab7 100644 --- a/docs/vyos.vyos.vyos_bgp_address_family_module.rst +++ b/docs/vyos.vyos.vyos_bgp_address_family_module.rst @@ -1177,39 +1177,39 @@ Examples # vyos@vyos:~$ show configuration commands | match "set protocols bgp" # vyos@vyos:~$ - - name: Merge provided configuration with device configuration - vyos.vyos.vyos_bgp_address_family: - config: - as_number: "100" - address_family: - - afi: "ipv4" - redistribute: - - protocol: "static" - metric: 50 - neighbors: - - neighbor_address: "20.33.1.1/24" - address_family: - - afi: "ipv4" - allowas_in: 4 - as_override: True - attribute_unchanged: - med: True - - afi: "ipv6" - default_originate: "map01" - distribute_list: - - action: "export" - acl: 10 - - neighbor_address: "100.11.34.12" - address_family: - - afi: "ipv4" - maximum_prefix: 45 - nexthop_self: True - route_map: - - action: "export" - route_map: "map01" - - action: "import" - route_map: "map01" - weight: 50 + - name: Merge provided configuration with device configuration + vyos.vyos.vyos_bgp_address_family: + config: + as_number: "100" + address_family: + - afi: "ipv4" + redistribute: + - protocol: "static" + metric: 50 + neighbors: + - neighbor_address: "20.33.1.1/24" + address_family: + - afi: "ipv4" + allowas_in: 4 + as_override: true + attribute_unchanged: + med: true + - afi: "ipv6" + default_originate: "map01" + distribute_list: + - action: "export" + acl: 10 + - neighbor_address: "100.11.34.12" + address_family: + - afi: "ipv4" + maximum_prefix: 45 + nexthop_self: true + route_map: + - action: "export" + route_map: "map01" + - action: "import" + route_map: "map01" + weight: 50 # After State: # vyos@vyos:~$ show configuration commands | match "set protocols bgp" @@ -1323,33 +1323,32 @@ Examples # set protocols bgp 100 neighbor 100.11.34.12 address-family ipv4-unicast weight '50' # vyos@vyos:~$ - - name: Replace provided configuration with device configuration - vyos.vyos.vyos_bgp_address_family: - config: - as_number: "100" - neighbors: - - neighbor_address: "100.11.34.12" - address_family: - - afi: "ipv4" - allowas_in: 4 - as_override: True - attribute_unchanged: - med: True - - afi: "ipv6" - default_originate: "map01" - distribute_list: - - action: "export" - acl: 10 - - neighbor_address: "20.33.1.1/24" - address_family: - - afi: "ipv6" - maximum_prefix: 45 - nexthop_self: True - - state: replaced + - name: Replace provided configuration with device configuration + vyos.vyos.vyos_bgp_address_family: + config: + as_number: "100" + neighbors: + - neighbor_address: "100.11.34.12" + address_family: + - afi: "ipv4" + allowas_in: 4 + as_override: true + attribute_unchanged: + med: true + - afi: "ipv6" + default_originate: "map01" + distribute_list: + - action: "export" + acl: 10 + - neighbor_address: "20.33.1.1/24" + address_family: + - afi: "ipv6" + maximum_prefix: 45 + nexthop_self: true + state: replaced # After State: - + # # vyos@vyos:~$ show configuration commands | match "set protocols bgp" # set protocols bgp 100 address-family ipv4-unicast redistribute static metric '50' # set protocols bgp 100 neighbor 20.33.1.1/24 address-family ipv4-unicast @@ -1513,31 +1512,31 @@ Examples # set protocols bgp 100 neighbor 100.11.34.12 address-family ipv6-unicast distribute-list export '10' # vyos@vyos:~$ - - name: Override - vyos.vyos.vyos_bgp_address_family: - config: - as_number: "100" - neighbors: - - neighbor_address: "100.11.34.12" - address_family: - - afi: "ipv6" - maximum_prefix: 45 - nexthop_self: True - route_map: - - action: "import" - route_map: "map01" - address_family: - - afi: "ipv4" - aggregate_address: - - prefix: "60.9.2.0/24" - summary_only: True - - afi: "ipv6" - redistribute: - - protocol: "static" - metric: 50 - state: overridden - - # Aft=validate-moduleser State + - name: Override + vyos.vyos.vyos_bgp_address_family: + config: + as_number: "100" + neighbors: + - neighbor_address: "100.11.34.12" + address_family: + - afi: "ipv6" + maximum_prefix: 45 + nexthop_self: true + route_map: + - action: "import" + route_map: "map01" + address_family: + - afi: "ipv4" + aggregate_address: + - prefix: "60.9.2.0/24" + summary_only: true + - afi: "ipv6" + redistribute: + - protocol: "static" + metric: 50 + state: overridden + + # After State # vyos@vyos:~$ show configuration commands | match "set protocols bgp" # set protocols bgp 100 address-family ipv4-unicast aggregate-address 60.9.2.0/24 summary-only @@ -1712,18 +1711,18 @@ Examples # set protocols bgp 100 neighbor 100.11.34.12 address-family ipv6-unicast route-map import 'map01' # vyos@vyos:~$ - - name: Delete - vyos.vyos.vyos_bgp_address_family: - config: - as_number: "100" - neighbors: - - neighbor_address: "20.33.1.1/24" - address_family: - - afi: "ipv6" - - neighbor_address: "100.11.34.12" - address_family: - - afi: "ipv4" - state: deleted + - name: Delete + vyos.vyos.vyos_bgp_address_family: + config: + as_number: "100" + neighbors: + - neighbor_address: "20.33.1.1/24" + address_family: + - afi: "ipv6" + - neighbor_address: "100.11.34.12" + address_family: + - afi: "ipv4" + state: deleted # After State: @@ -1874,12 +1873,13 @@ Examples # set protocols bgp 65536 neighbor 203.0.113.5 address-family ipv6-unicast attribute-unchanged next-hop - - name: parse configs - vyos.vyos.vyos_bgp_address_family: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed + - name: parse configs + vyos.vyos.vyos_bgp_address_family: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed - # Module Execution: + # Module execution result: + # # "parsed": { # "address_family": [ # { @@ -1957,12 +1957,12 @@ Examples # set protocols bgp 100 neighbor 20.33.1.1/24 address-family ipv4-unicast attribute-unchanged med # set protocols bgp 100 neighbor 100.11.34.12 - - name: gather configs - vyos.vyos.vyos_bgp_address_family: - state: gathered - - # Module Execution: + - name: gather configs + vyos.vyos.vyos_bgp_address_family: + state: gathered + # Module execution result: + # # "gathered": { # "address_family": [ # { @@ -2021,40 +2021,40 @@ Examples # Using rendered: - - name: Render - vyos.vyos.vyos_bgp_address_family: - config: - as_number: "100" - address_family: - - afi: "ipv4" - redistribute: - - protocol: "static" - metric: 50 - neighbors: - - neighbor_address: "20.33.1.1/24" - address_family: - - afi: "ipv4" - allowas_in: 4 - as_override: True - attribute_unchanged: - med: True - - afi: "ipv6" - default_originate: "map01" - distribute_list: - - action: "export" - acl: 10 - - neighbor_address: "100.11.34.12" - address_family: - - afi: "ipv4" - maximum_prefix: 45 - nexthop_self: True - route_map: - - action: "export" - route_map: "map01" - - action: "import" - route_map: "map01" - weight: 50 - state: rendered + - name: Render + vyos.vyos.vyos_bgp_address_family: + config: + as_number: "100" + address_family: + - afi: "ipv4" + redistribute: + - protocol: "static" + metric: 50 + neighbors: + - neighbor_address: "20.33.1.1/24" + address_family: + - afi: "ipv4" + allowas_in: 4 + as_override: true + attribute_unchanged: + med: true + - afi: "ipv6" + default_originate: "map01" + distribute_list: + - action: "export" + acl: 10 + - neighbor_address: "100.11.34.12" + address_family: + - afi: "ipv4" + maximum_prefix: 45 + nexthop_self: true + route_map: + - action: "export" + route_map: "map01" + - action: "import" + route_map: "map01" + weight: 50 + state: rendered # Module Execution: diff --git a/docs/vyos.vyos.vyos_bgp_global_module.rst b/docs/vyos.vyos.vyos_bgp_global_module.rst index 06bd918..a2e3db7 100644 --- a/docs/vyos.vyos.vyos_bgp_global_module.rst +++ b/docs/vyos.vyos.vyos_bgp_global_module.rst @@ -2091,63 +2091,62 @@ Examples # vyos@vyos:~$ show configuration commands | match "set protocols bgp" # vyos@vyos:~$ - - name: Merge provided configuration with device configuration - vyos.vyos.vyos_bgp_global: - config: - as_number: "65536" - aggregate_address: - - prefix: "203.0.113.0/24" - as_set: true - - prefix: "192.0.2.0/24" - summary_only: true - network: - - address: "192.1.13.0/24" - backdoor: true - redistribute: - - protocol: "kernel" - metric: 45 - - protocol: "connected" - route_map: "map01" - maximum_paths: - - path: "ebgp" - count: 20 - - path: "ibgp" - count: 55 - timers: - keepalive: 35 - bgp_params: - bestpath: - as_path: "confed" - compare_routerid: true - default: - no_ipv4_unicast: true - router_id: "192.1.2.9" - confederation: - - peers: 20 - - peers: 55 - - identifier: 66 - neighbor: - - address: "192.0.2.25" - disable_connected_check: true - timers: - holdtime: 30 - keepalive: 10 - - address: "203.0.113.5" - attribute_unchanged: - as_path: true - med: true - ebgp_multihop: 2 - remote_as: 101 - update_source: "192.0.2.25" - - address: "5001::64" - maximum_prefix: 34 - distribute_list: - - acl: 20 - action: "export" - - acl: 40 - action: "import" - - state: merged + - name: Merge provided configuration with device configuration + vyos.vyos.vyos_bgp_global: + config: + as_number: "65536" + aggregate_address: + - prefix: "203.0.113.0/24" + as_set: true + - prefix: "192.0.2.0/24" + summary_only: true + network: + - address: "192.1.13.0/24" + backdoor: true + redistribute: + - protocol: "kernel" + metric: 45 + - protocol: "connected" + route_map: "map01" + maximum_paths: + - path: "ebgp" + count: 20 + - path: "ibgp" + count: 55 + timers: + keepalive: 35 + bgp_params: + bestpath: + as_path: "confed" + compare_routerid: true + default: + no_ipv4_unicast: true + router_id: "192.1.2.9" + confederation: + - peers: 20 + - peers: 55 + - identifier: 66 + neighbor: + - address: "192.0.2.25" + disable_connected_check: true + timers: + holdtime: 30 + keepalive: 10 + - address: "203.0.113.5" + attribute_unchanged: + as_path: true + med: true + ebgp_multihop: 2 + remote_as: 101 + update_source: "192.0.2.25" + - address: "5001::64" + maximum_prefix: 34 + distribute_list: + - acl: 20 + action: "export" + - acl: 40 + action: "import" + state: merged # After State # vyos@vyos:~$ show configuration commands | match "set protocols bgp" @@ -2347,26 +2346,25 @@ Examples # set protocols bgp 65536 timers keepalive '35' # vyos@vyos:~$ - - name: Replace - vyos.vyos.vyos_bgp_global: - config: - as_number: "65536" - network: - - address: "203.0.113.0/24" - route_map: map01 - redistribute: - - protocol: "static" - route_map: "map01" - neighbor: - - address: "192.0.2.40" - advertisement_interval: 72 - capability: - orf: "receive" - bgp_params: - bestpath: - as_path: "confed" - - state: replaced + - name: Replace + vyos.vyos.vyos_bgp_global: + config: + as_number: "65536" + network: + - address: "203.0.113.0/24" + route_map: map01 + redistribute: + - protocol: "static" + route_map: "map01" + neighbor: + - address: "192.0.2.40" + advertisement_interval: 72 + capability: + orf: "receive" + bgp_params: + bestpath: + as_path: "confed" + state: replaced # After state: # vyos@vyos:~$ show configuration commands | match "set protocols bgp" @@ -2544,11 +2542,11 @@ Examples # set protocols bgp 65536 redistribute static route-map 'map01' # vyos@vyos:~$ - - name: Delete configuration - vyos.vyos.vyos_bgp_global: - config: - as_number: "65536" - state: deleted + - name: Delete configuration + vyos.vyos.vyos_bgp_global: + config: + as_number: "65536" + state: deleted # After state: @@ -2634,11 +2632,11 @@ Examples # vyos@vyos:~$ - - name: Purge configuration - vyos.vyos.vyos_bgp_global: - config: - as_number: "65536" - state: purged + - name: Purge configuration + vyos.vyos.vyos_bgp_global: + config: + as_number: "65536" + state: purged # After state: @@ -2779,12 +2777,11 @@ Examples # vyos@vyos:~$ ^C # vyos@vyos:~$ - - - name: Delete configuration - vyos.vyos.vyos_bgp_global: - config: - as_number: "65536" - state: deleted + - name: Delete configuration + vyos.vyos.vyos_bgp_global: + config: + as_number: "65536" + state: deleted # Module Execution: # @@ -2835,9 +2832,9 @@ Examples # set protocols bgp 65536 redistribute static route-map 'map01' # vyos@vyos:~$ ^C - - name: gather configs - vyos.vyos.vyos_bgp_global: - state: gathered + - name: gather configs + vyos.vyos.vyos_bgp_global: + state: gathered # Module Execution: # "gathered": { @@ -2927,12 +2924,12 @@ Examples # set protocols bgp 65536 parameters distance global local '10' # set protocols bgp 65536 redistribute static route-map 'map01' - - name: parse configs - vyos.vyos.vyos_bgp_global: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed - tags: - - parsed + - name: parse configs + vyos.vyos.vyos_bgp_global: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed + tags: + - parsed # Module execution: # "parsed": { @@ -2999,49 +2996,48 @@ Examples # Using rendered: # -------------- - - name: Render - vyos.vyos.vyos_bgp_global: - config: - as_number: "65536" - network: - - address: "203.0.113.0/24" - route_map: map01 - redistribute: - - protocol: "static" - route_map: "map01" - bgp_params: - always_compare_med: true - dampening: - start_suppress_time: 5 - max_suppress_time: 20 - half_life: 33 - re_use: 60 - distance: - - type: "internal" - value: 20 - - type: "local" - value: 10 - - type: "external" - value: 66 - bestpath: - as_path: "confed" - compare_routerid: true - default: - no_ipv4_unicast: true - neighbor: - - address: "192.0.2.43" - disable_connected_check: true - advertisement_interval: 72 - capability: - dynamic: true - timers: - holdtime: 30 - keepalive: 10 - - address: "203.0.113.0" - capability: - orf: "receive" - - state: rendered + - name: Render + vyos.vyos.vyos_bgp_global: + config: + as_number: "65536" + network: + - address: "203.0.113.0/24" + route_map: map01 + redistribute: + - protocol: "static" + route_map: "map01" + bgp_params: + always_compare_med: true + dampening: + start_suppress_time: 5 + max_suppress_time: 20 + half_life: 33 + re_use: 60 + distance: + - type: "internal" + value: 20 + - type: "local" + value: 10 + - type: "external" + value: 66 + bestpath: + as_path: "confed" + compare_routerid: true + default: + no_ipv4_unicast: true + neighbor: + - address: "192.0.2.43" + disable_connected_check: true + advertisement_interval: 72 + capability: + dynamic: true + timers: + holdtime: 30 + keepalive: 10 + - address: "203.0.113.0" + capability: + orf: "receive" + state: rendered # Module Execution: # "rendered": [ diff --git a/docs/vyos.vyos.vyos_command_module.rst b/docs/vyos.vyos.vyos_command_module.rst index 042624b..34506d4 100644 --- a/docs/vyos.vyos.vyos_command_module.rst +++ b/docs/vyos.vyos.vyos_command_module.rst @@ -145,26 +145,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 diff --git a/docs/vyos.vyos.vyos_config_module.rst b/docs/vyos.vyos.vyos_config_module.rst index a99e264..999a3f5 100644 --- a/docs/vyos.vyos.vyos_config_module.rst +++ b/docs/vyos.vyos.vyos_config_module.rst @@ -223,14 +223,14 @@ Examples - name: configure the remote device vyos.vyos.vyos_config: lines: - - set system host-name {{ inventory_hostname }} - - set service lldp - - delete service dhcp-server + - set system host-name {{ inventory_hostname }} + - set service lldp + - delete service dhcp-server - name: backup and load from file vyos.vyos.vyos_config: src: vyos.cfg - backup: yes + backup: true - name: render a Jinja2 template onto the VyOS router vyos.vyos.vyos_config: @@ -240,11 +240,11 @@ Examples vyos.vyos.vyos_config: lines: # - set int eth eth2 description 'OUTSIDE' - - set interface ethernet eth2 description 'OUTSIDE' + - set interface ethernet eth2 description 'OUTSIDE' - name: configurable backup path vyos.vyos.vyos_config: - backup: yes + backup: true backup_options: filename: backup.cfg dir_path: /home/user diff --git a/docs/vyos.vyos.vyos_facts_module.rst b/docs/vyos.vyos.vyos_facts_module.rst index af39283..836224f 100644 --- a/docs/vyos.vyos.vyos_facts_module.rst +++ b/docs/vyos.vyos.vyos_facts_module.rst @@ -120,15 +120,15 @@ Examples # Collect only the interfaces facts - vyos.vyos.vyos_facts: gather_subset: - - '!all' - - '!min' + - '!all' + - '!min' gather_network_resources: - - interfaces + - interfaces # Do not collect interfaces facts - vyos.vyos.vyos_facts: gather_network_resources: - - '!interfaces' + - '!interfaces' # Collect interfaces and minimal default facts - vyos.vyos.vyos_facts: diff --git a/docs/vyos.vyos.vyos_firewall_global_module.rst b/docs/vyos.vyos.vyos_firewall_global_module.rst index e090e2e..34293b1 100644 --- a/docs/vyos.vyos.vyos_firewall_global_module.rst +++ b/docs/vyos.vyos.vyos_firewall_global_module.rst @@ -849,30 +849,30 @@ Examples all: true broadcast: true state_policy: - - connection_type: established - action: accept - log: true - - connection_type: invalid - action: reject + - connection_type: established + action: accept + log: true + - connection_type: invalid + action: reject route_redirects: - - afi: ipv4 - ip_src_route: true - icmp_redirects: - send: true - receive: false + - afi: ipv4 + ip_src_route: true + icmp_redirects: + send: true + receive: false group: address_group: - - name: MGMT-HOSTS - description: This group has the Management hosts address list - members: - - address: 192.0.1.1 - - address: 192.0.1.3 - - address: 192.0.1.5 + - name: MGMT-HOSTS + description: This group has the Management hosts address list + members: + - address: 192.0.1.1 + - address: 192.0.1.3 + - address: 192.0.1.5 network_group: - - name: MGMT - description: This group has the Management network addresses - members: - - address: 192.0.1.0/24 + - name: MGMT + description: This group has the Management network addresses + members: + - address: 192.0.1.0/24 state: merged # # @@ -1228,6 +1228,7 @@ Examples # ] # # "after": [] + # # After state # ------------ # vyos@192# run show configuration commands | grep firewall @@ -1259,7 +1260,7 @@ Examples # set firewall state-policy invalid action 'reject' # set firewall syn-cookies 'enable' # set firewall twa-hazards-protection 'enable' - # + - name: Replace firewall global attributes configuration. vyos.vyos.vyos_firewall_global: config: @@ -1268,39 +1269,39 @@ Examples log_martians: true syn_cookies: true twa_hazards_protection: true - ping: + ping: null all: true broadcast: true state_policy: - - connection_type: established - action: accept - log: true - - connection_type: invalid - action: reject + - connection_type: established + action: accept + log: true + - connection_type: invalid + action: reject route_redirects: - - afi: ipv4 - ip_src_route: true - icmp_redirects: - send: true - receive: false + - afi: ipv4 + ip_src_route: true + icmp_redirects: + send: true + receive: false group: address_group: - - name: SALES-HOSTS - description: Sales office hosts address list - members: - - address: 192.0.2.1 - - address: 192.0.2.2 - - address: 192.0.2.3 - - name: ENG-HOSTS - description: Sales office hosts address list - members: - - address: 192.0.3.1 - - address: 192.0.3.2 + - name: SALES-HOSTS + description: Sales office hosts address list + members: + - address: 192.0.2.1 + - address: 192.0.2.2 + - address: 192.0.2.3 + - name: ENG-HOSTS + description: Sales office hosts address list + members: + - address: 192.0.3.1 + - address: 192.0.3.2 network_group: - - name: MGMT - description: This group has the Management network addresses - members: - - address: 192.0.1.0/24 + - name: MGMT + description: This group has the Management network addresses + members: + - address: 192.0.1.0/24 state: replaced # # @@ -1518,7 +1519,6 @@ Examples # - name: Gather firewall global config with provided configurations vyos.vyos.vyos_firewall_global: - config: state: gathered # # @@ -1641,40 +1641,41 @@ Examples log_martians: true syn_cookies: true twa_hazards_protection: true - ping: + ping: null all: true broadcast: true state_policy: - - connection_type: established - action: accept - log: true - - connection_type: invalid - action: reject + - connection_type: established + action: accept + log: true + - connection_type: invalid + action: reject route_redirects: - - afi: ipv4 - ip_src_route: true - icmp_redirects: - send: true - receive: false + - afi: ipv4 + ip_src_route: true + icmp_redirects: null + send: true + receive: false group: address_group: - - name: SALES-HOSTS - description: Sales office hosts address list - members: - - address: 192.0.2.1 - - address: 192.0.2.2 - - address: 192.0.2.3 - - name: ENG-HOSTS - description: Sales office hosts address list - members: - - address: 192.0.3.1 - - address: 192.0.3.2 + - name: SALES-HOSTS + description: Sales office hosts address list + members: + - address: 192.0.2.1 + - address: 192.0.2.2 + - address: 192.0.2.3 + - name: ENG-HOSTS + description: Sales office hosts address list + members: + - address: 192.0.3.1 + - address: 192.0.3.2 network_group: - - name: MGMT - description: This group has the Management network addresses - members: - - address: 192.0.1.0/24 + - name: MGMT + description: This group has the Management network addresses + members: + - address: 192.0.1.0/24 state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_firewall_interfaces_module.rst b/docs/vyos.vyos.vyos_firewall_interfaces_module.rst index 30e8c1d..8510812 100644 --- a/docs/vyos.vyos.vyos_firewall_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_firewall_interfaces_module.rst @@ -232,34 +232,34 @@ Examples - name: Merge the provided configuration with the existing running configuration vyos.vyos.vyos_firewall_interfaces: config: - - access_rules: - - afi: ipv4 - rules: - - name: INBOUND - direction: in - - name: OUTBOUND - direction: out - - name: LOCAL - direction: local - - afi: ipv6 - rules: - - name: V6-LOCAL - direction: local - name: eth1 - - access_rules: - - afi: ipv4 - rules: - - name: INBOUND - direction: in - - name: OUTBOUND - direction: out - - name: LOCAL - direction: local - - afi: ipv6 - rules: - - name: V6-LOCAL - direction: local - name: eth3 + - access_rules: + - afi: ipv4 + rules: + - name: INBOUND + direction: in + - name: OUTBOUND + direction: out + - name: LOCAL + direction: local + - afi: ipv6 + rules: + - name: V6-LOCAL + direction: local + name: eth1 + - access_rules: + - afi: ipv4 + rules: + - name: INBOUND + direction: in + - name: OUTBOUND + direction: out + - name: LOCAL + direction: local + - afi: ipv6 + rules: + - name: V6-LOCAL + direction: local + name: eth3 state: merged # # @@ -404,15 +404,16 @@ Examples - name: Merge the provided configuration with the existing running configuration vyos.vyos.vyos_firewall_interfaces: config: - - access_rules: - - afi: ipv4 - rules: - - name: OUTBOUND - direction: in - - name: INBOUND - direction: out - name: eth1 + - access_rules: + - afi: ipv4 + rules: + - name: OUTBOUND + direction: in + - name: INBOUND + direction: out + name: eth1 state: merged + # # # ------------------------- @@ -603,27 +604,29 @@ Examples # set interfaces ethernet eth3 firewall local name 'LOCAL' # set interfaces ethernet eth3 firewall out name 'OUTBOUND' # - - name: Replace device configurations of listed firewall interfaces with provided + - name: >- + Replace device configurations of listed firewall interfaces with provided configurations vyos.vyos.vyos_firewall_interfaces: config: - - name: eth1 - access_rules: - - afi: ipv4 - rules: - - name: OUTBOUND - direction: out - - afi: ipv6 - rules: - - name: V6-LOCAL - direction: local - - name: eth3 - access_rules: - - afi: ipv4 - rules: - - name: INBOUND - direction: in + - name: eth1 + access_rules: + - afi: ipv4 + rules: + - name: OUTBOUND + direction: out + - afi: ipv6 + rules: + - name: V6-LOCAL + direction: local + - name: eth3 + access_rules: + - afi: ipv4 + rules: + - name: INBOUND + direction: in state: replaced + # # # ------------------------- @@ -791,12 +794,12 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_firewall_interfaces: config: - - name: eth3 - access_rules: - - afi: ipv4 - rules: - - name: INBOUND - direction: out + - name: eth3 + access_rules: + - afi: ipv4 + rules: + - name: INBOUND + direction: out state: overridden # # @@ -918,8 +921,8 @@ Examples - name: Delete firewall interfaces based on interface name. vyos.vyos.vyos_firewall_interfaces: config: - - name: eth1 - - name: eth3 + - name: eth1 + - name: eth3 state: deleted # # @@ -1047,10 +1050,10 @@ Examples - name: Delete firewall interfaces config per afi. vyos.vyos.vyos_firewall_interfaces: config: - - name: eth1 - access_rules: - - afi: ipv4 - - afi: ipv6 + - name: eth1 + access_rules: + - afi: ipv4 + - afi: ipv6 state: deleted # # @@ -1073,7 +1076,6 @@ Examples # set firewall name 'LOCAL' # set firewall name 'OUTBOUND' - # Using deleted without config # # Before state @@ -1095,7 +1097,6 @@ Examples # - name: Delete firewall interfaces config when empty config provided. vyos.vyos.vyos_firewall_interfaces: - config: state: deleted # # @@ -1119,7 +1120,6 @@ Examples # Using parsed # - # - name: Parse the provided configuration vyos.vyos.vyos_firewall_interfaces: running_config: @@ -1230,7 +1230,6 @@ Examples # - name: Gather listed firewall interfaces. vyos.vyos.vyos_firewall_interfaces: - config: state: gathered # # @@ -1307,17 +1306,18 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_firewall_interfaces: config: - - name: eth2 - access_rules: - - afi: ipv4 - rules: - - direction: in - name: INGRESS - - direction: out - name: OUTGRESS - - direction: local - name: DROP + - name: eth2 + access_rules: + - afi: ipv4 + rules: + - direction: in + name: INGRESS + - direction: out + name: OUTGRESS + - direction: local + name: DROP state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_firewall_rules_module.rst b/docs/vyos.vyos.vyos_firewall_rules_module.rst index f35f1e7..246824b 100644 --- a/docs/vyos.vyos.vyos_firewall_rules_module.rst +++ b/docs/vyos.vyos.vyos_firewall_rules_module.rst @@ -1367,13 +1367,13 @@ Examples # set firewall name Downlink rule 502 action 'reject' # set firewall name Downlink rule 502 description 'Rule 502 is configured by Ansible' # set firewall name Downlink rule 502 ipsec 'match-ipsec' - # + - name: Delete attributes of given firewall rules. vyos.vyos.vyos_firewall_rules: config: - - afi: ipv4 - rule_sets: - - name: Downlink + - afi: ipv4 + rule_sets: + - name: Downlink state: deleted # # @@ -1444,11 +1444,10 @@ Examples # set firewall name Downlink rule 502 description 'Rule 502 is configured by Ansible' # set firewall name Downlink rule 502 ipsec 'match-ipsec' - # - name: Delete attributes of given firewall rules. vyos.vyos.vyos_firewall_rules: config: - - afi: ipv4 + - afi: ipv4 state: deleted # # @@ -1544,7 +1543,6 @@ Examples # - name: Delete attributes of given firewall rules. vyos.vyos.vyos_firewall_rules: - config: state: deleted # # @@ -1600,48 +1598,47 @@ Examples - name: Merge the provided configuration with the existing running configuration vyos.vyos.vyos_firewall_rules: config: - - afi: ipv6 - rule_sets: - - name: UPLINK - description: This is ipv6 specific rule-set - default_action: accept - rules: - - number: 1 - action: accept - description: Fwipv6-Rule 1 is configured by Ansible - ipsec: match-ipsec - - number: 2 - action: accept - description: Fwipv6-Rule 2 is configured by Ansible - ipsec: match-ipsec - - - afi: ipv4 - rule_sets: - - name: INBOUND - description: IPv4 INBOUND rule set - default_action: accept - rules: - - number: 101 - action: accept - description: Rule 101 is configured by Ansible - ipsec: match-ipsec - - number: 102 - action: reject - description: Rule 102 is configured by Ansible - ipsec: match-ipsec - - number: 103 - action: accept - description: Rule 103 is configured by Ansible - destination: - group: - address_group: inbound - source: - address: 192.0.2.0 - state: - established: true - new: false - invalid: false - related: true + - afi: ipv6 + rule_sets: + - name: UPLINK + description: This is ipv6 specific rule-set + default_action: accept + rules: + - number: 1 + action: accept + description: Fwipv6-Rule 1 is configured by Ansible + ipsec: match-ipsec + - number: 2 + action: accept + description: Fwipv6-Rule 2 is configured by Ansible + ipsec: match-ipsec + - afi: ipv4 + rule_sets: + - name: INBOUND + description: IPv4 INBOUND rule set + default_action: accept + rules: + - number: 101 + action: accept + description: Rule 101 is configured by Ansible + ipsec: match-ipsec + - number: 102 + action: reject + description: Rule 102 is configured by Ansible + ipsec: match-ipsec + - number: 103 + action: accept + description: Rule 103 is configured by Ansible + destination: + group: + address_group: inbound + source: + address: 192.0.2.0 + state: + established: true + new: false + invalid: false + related: true state: merged # # @@ -1816,28 +1813,30 @@ Examples # set firewall name INBOUND rule 103 state new 'disable' # set firewall name INBOUND rule 103 state related 'enable' # - - name: Replace device configurations of listed firewall rules with provided configurations + - name: >- + Replace device configurations of listed firewall rules with provided + configurations vyos.vyos.vyos_firewall_rules: config: - - afi: ipv6 - rule_sets: - - name: UPLINK - description: This is ipv6 specific rule-set - default_action: accept - - afi: ipv4 - rule_sets: - - name: INBOUND - description: IPv4 INBOUND rule set - default_action: accept - rules: - - number: 101 - action: accept - description: Rule 101 is configured by Ansible - ipsec: match-ipsec - - number: 104 - action: reject - description: Rule 104 is configured by Ansible - ipsec: match-none + - afi: ipv6 + rule_sets: + - name: UPLINK + description: This is ipv6 specific rule-set + default_action: accept + - afi: ipv4 + rule_sets: + - name: INBOUND + description: IPv4 INBOUND rule set + default_action: accept + rules: + - number: 101 + action: accept + description: Rule 101 is configured by Ansible + ipsec: match-ipsec + - number: 104 + action: reject + description: Rule 104 is configured by Ansible + ipsec: match-none state: replaced # # @@ -2001,21 +2000,22 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_firewall_rules: config: - - afi: ipv4 - rule_sets: - - name: Downlink - description: IPv4 INBOUND rule set - default_action: accept - rules: - - number: 501 - action: accept - description: Rule 501 is configured by Ansible - ipsec: match-ipsec - - number: 502 - action: reject - description: Rule 502 is configured by Ansible - ipsec: match-ipsec + - afi: ipv4 + rule_sets: + - name: Downlink + description: IPv4 INBOUND rule set + default_action: accept + rules: + - number: 501 + action: accept + description: Rule 501 is configured by Ansible + ipsec: match-ipsec + - number: 502 + action: reject + description: Rule 502 is configured by Ansible + ipsec: match-ipsec state: overridden + # # # ------------------------- @@ -2151,7 +2151,6 @@ Examples # - name: Gather listed firewall rules with provided configurations vyos.vyos.vyos_firewall_rules: - config: state: gathered # # @@ -2267,39 +2266,40 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_firewall_rules: config: - - afi: ipv6 - rule_sets: - - name: UPLINK - description: This is ipv6 specific rule-set - default_action: accept - - afi: ipv4 - rule_sets: - - name: INBOUND - description: IPv4 INBOUND rule set - default_action: accept - rules: - - number: 101 - action: accept - description: Rule 101 is configured by Ansible - ipsec: match-ipsec - - number: 102 - action: reject - description: Rule 102 is configured by Ansible - ipsec: match-ipsec - - number: 103 - action: accept - description: Rule 103 is configured by Ansible - destination: - group: - address_group: inbound - source: - address: 192.0.2.0 - state: - established: true - new: false - invalid: false - related: true + - afi: ipv6 + rule_sets: + - name: UPLINK + description: This is ipv6 specific rule-set + default_action: accept + - afi: ipv4 + rule_sets: + - name: INBOUND + description: IPv4 INBOUND rule set + default_action: accept + rules: + - number: 101 + action: accept + description: Rule 101 is configured by Ansible + ipsec: match-ipsec + - number: 102 + action: reject + description: Rule 102 is configured by Ansible + ipsec: match-ipsec + - number: 103 + action: accept + description: Rule 103 is configured by Ansible + destination: + group: + address_group: inbound + source: + address: 192.0.2.0 + state: + established: true + new: false + invalid: false + related: true state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_hostname_module.rst b/docs/vyos.vyos.vyos_hostname_module.rst index 569017a..56bba4c 100644 --- a/docs/vyos.vyos.vyos_hostname_module.rst +++ b/docs/vyos.vyos.vyos_hostname_module.rst @@ -130,96 +130,104 @@ Examples .. code-block:: yaml - # 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": { diff --git a/docs/vyos.vyos.vyos_interfaces_module.rst b/docs/vyos.vyos.vyos_interfaces_module.rst index 1203c20..f5f6941 100644 --- a/docs/vyos.vyos.vyos_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_interfaces_module.rst @@ -343,21 +343,21 @@ Examples - name: Merge provided configuration with device configuration vyos.vyos.vyos_interfaces: config: - - name: eth2 - description: Configured by Ansible - enabled: true - vifs: - - vlan_id: 200 - description: VIF 200 - ETH2 - - name: eth3 - description: Configured by Ansible - mtu: 1500 - - name: bond1 - description: Bond - 1 - mtu: 1200 - - name: vti2 - description: VTI - 2 - enabled: false + - name: eth2 + description: Configured by Ansible + enabled: true + vifs: + - vlan_id: 200 + description: VIF 200 - ETH2 + - name: eth3 + description: Configured by Ansible + mtu: 1500 + - name: bond1 + description: Bond - 1 + mtu: 1200 + - name: vti2 + description: VTI - 2 + enabled: false state: merged # Task Output @@ -475,12 +475,12 @@ Examples - name: Replace device configurations of listed interfaces with provided configurations vyos.vyos.vyos_interfaces: config: - - name: eth2 - description: Replaced by Ansible - - name: eth3 - description: Replaced by Ansible - - name: eth1 - description: Replaced by Ansible + - name: eth2 + description: Replaced by Ansible + - name: eth3 + description: Replaced by Ansible + - name: eth1 + description: Replaced by Ansible state: replaced # Task Output @@ -613,15 +613,15 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_interfaces: config: - - name: eth0 - description: Outbound Interface For The Appliance - speed: auto - duplex: auto - - name: eth2 - speed: auto - duplex: auto - - name: eth3 - mtu: 1200 + - name: eth0 + description: Outbound Interface For The Appliance + speed: auto + duplex: auto + - name: eth2 + speed: auto + duplex: auto + - name: eth3 + mtu: 1200 state: overridden # Task Output @@ -752,10 +752,10 @@ Examples themselves) vyos.vyos.vyos_interfaces: config: - - name: bond1 - - name: eth1 - - name: eth2 - - name: eth3 + - name: bond1 + - name: eth1 + - name: eth2 + - name: eth3 state: deleted # Task Output @@ -869,7 +869,6 @@ Examples # - name: Gather listed interfaces with provided configurations vyos.vyos.vyos_interfaces: - config: state: gathered # Task output @@ -906,30 +905,31 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_interfaces: config: - - name: eth0 - enabled: true - duplex: auto - speed: auto - - name: eth1 - description: Configured by Ansible - Interface 1 - mtu: 1500 - speed: auto - duplex: auto - enabled: true - vifs: - - vlan_id: 100 - description: Eth1 - VIF 100 - mtu: 400 + - name: eth0 enabled: true - - vlan_id: 101 - description: Eth1 - VIF 101 + duplex: auto + speed: auto + - name: eth1 + description: Configured by Ansible - Interface 1 + mtu: 1500 + speed: auto + duplex: auto enabled: true - - name: eth2 - description: Configured by Ansible - Interface 2 (ADMIN DOWN) - mtu: 600 - enabled: false + vifs: + - vlan_id: 100 + description: Eth1 - VIF 100 + mtu: 400 + enabled: true + - vlan_id: 101 + description: Eth1 - VIF 101 + enabled: true + - name: eth2 + description: Configured by Ansible - Interface 2 (ADMIN DOWN) + mtu: 600 + enabled: false state: rendered + # Task Output # ----------- # rendered: diff --git a/docs/vyos.vyos.vyos_l3_interfaces_module.rst b/docs/vyos.vyos.vyos_l3_interfaces_module.rst index 9e44116..4f93705 100644 --- a/docs/vyos.vyos.vyos_l3_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_l3_interfaces_module.rst @@ -319,28 +319,28 @@ Examples - name: Merge provided configuration with device configuration vyos.vyos.vyos_l3_interfaces: config: - - name: eth2 - ipv4: - - address: 192.0.2.10/28 - - address: 198.51.100.40/27 - ipv6: - - address: 2001:db8:100::2/32 - - address: 2001:db8:400::10/32 - - - name: eth3 - ipv4: - - address: 203.0.113.65/26 - vifs: - - vlan_id: 101 + - name: eth2 ipv4: - - address: 192.0.2.71/28 - - address: 198.51.100.131/25 - - vlan_id: 102 + - address: 192.0.2.10/28 + - address: 198.51.100.40/27 ipv6: - - address: 2001:db8:1000::5/38 - - address: 2001:db8:1400::3/38 + - address: '2001:db8:100::2/32' + - address: '2001:db8:400::10/32' + - name: eth3 + ipv4: + - address: 203.0.113.65/26 + vifs: + - vlan_id: 101 + ipv4: + - address: 192.0.2.71/28 + - address: 198.51.100.131/25 + - vlan_id: 102 + ipv6: + - address: '2001:db8:1000::5/38' + - address: '2001:db8:1400::3/38' state: merged + # After state: # ------------- # @@ -387,13 +387,13 @@ Examples - name: Replace device configurations of listed interfaces with provided configurations vyos.vyos.vyos_l3_interfaces: config: - - name: eth2 - ipv4: - - address: 192.0.2.10/24 + - name: eth2 + ipv4: + - address: 192.0.2.10/24 - - name: eth3 - ipv6: - - address: 2001:db8::11/32 + - name: eth3 + ipv6: + - address: 2001:db8::11/32 state: replaced # After state: @@ -443,13 +443,14 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_l3_interfaces: config: - - name: eth0 - ipv4: - - address: dhcp - ipv6: - - address: dhcpv6 + - name: eth0 + ipv4: + - address: dhcp + ipv6: + - address: dhcpv6 state: overridden + # After state # ------------ # @@ -495,9 +496,9 @@ Examples itself) vyos.vyos.vyos_l3_interfaces: config: - - name: eth1 - - name: eth2 - - name: eth3 + - name: eth1 + - name: eth2 + - name: eth3 state: deleted # After state @@ -535,7 +536,6 @@ Examples # - name: Gather listed l3 interfaces with provided configurations vyos.vyos.vyos_l3_interfaces: - config: state: gathered # # @@ -604,17 +604,18 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_l3_interfaces: config: - - name: eth1 - ipv4: - - address: 192.0.2.14/24 - - name: eth2 - ipv4: - - address: 192.0.2.10/24 - - address: 192.0.2.11/24 - ipv6: - - address: 2001:db8::10/32 - - address: 2001:db8::12/32 + - name: eth1 + ipv4: + - address: 192.0.2.14/24 + - name: eth2 + ipv4: + - address: 192.0.2.10/24 + - address: 192.0.2.11/24 + ipv6: + - address: '2001:db8::10/32' + - address: '2001:db8::12/32' state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_lag_interfaces_module.rst b/docs/vyos.vyos.vyos_lag_interfaces_module.rst index 4ccbcf9..e389654 100644 --- a/docs/vyos.vyos.vyos_lag_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_lag_interfaces_module.rst @@ -287,21 +287,21 @@ Examples - name: Merge provided configuration with device configuration vyos.vyos.vyos_lag_interfaces: config: - - name: bond2 - mode: active-backup - members: - - member: eth2 - - member: eth1 - hash_policy: layer2 - primary: eth2 - - - name: bond3 - mode: active-backup - hash_policy: layer2+3 - members: - - member: eth3 - primary: eth3 + - name: bond2 + mode: active-backup + members: + - member: eth2 + - member: eth1 + hash_policy: layer2 + primary: eth2 + - name: bond3 + mode: active-backup + hash_policy: layer2+3 + members: + - member: eth3 + primary: eth3 state: merged + # # # ------------------------- @@ -391,11 +391,11 @@ Examples - name: Replace device configurations of listed LAGs with provided configurations vyos.vyos.vyos_lag_interfaces: config: - - name: bond3 - mode: 802.3ad - hash_policy: layer2 - members: - - member: eth3 + - name: bond3 + mode: 802.3ad + hash_policy: layer2 + members: + - member: eth3 state: replaced # # @@ -496,14 +496,14 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_lag_interfaces: config: - - name: bond3 - mode: active-backup - members: - - member: eth1 - - member: eth2 - - member: eth3 - primary: eth3 - hash_policy: layer2 + - name: bond3 + mode: active-backup + members: + - member: eth1 + - member: eth2 + - member: eth3 + primary: eth3 + hash_policy: layer2 state: overridden # # @@ -607,8 +607,8 @@ Examples itself) vyos.vyos.vyos_lag_interfaces: config: - - name: bond2 - - name: bond3 + - name: bond2 + - name: bond3 state: deleted # # @@ -686,9 +686,8 @@ Examples # set interfaces ethernet eth1 bond-group 'bond0' # set interfaces ethernet eth2 bond-group 'bond1' # - - name: Gather listed lag interfaces with provided configurations + - name: Gather listed lag interfaces with provided configurations vyos.vyos.vyos_lag_interfaces: - config: state: gathered # # @@ -787,19 +786,20 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_lag_interfaces: config: - - name: bond0 - hash_policy: layer2 - members: - - member: eth1 - mode: active-backup - primary: eth1 - - name: bond1 - hash_policy: layer2+3 - members: - - member: eth2 - mode: active-backup - primary: eth2 + - name: bond0 + hash_policy: layer2 + members: + - member: eth1 + mode: active-backup + primary: eth1 + - name: bond1 + hash_policy: layer2+3 + members: + - member: eth2 + mode: active-backup + primary: eth2 state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_lldp_global_module.rst b/docs/vyos.vyos.vyos_lldp_global_module.rst index 8ecc900..f858003 100644 --- a/docs/vyos.vyos.vyos_lldp_global_module.rst +++ b/docs/vyos.vyos.vyos_lldp_global_module.rst @@ -193,8 +193,8 @@ Examples vyos.vyos.vyos_lldp_global: config: legacy_protocols: - - fdp - - cdp + - fdp + - cdp snmp: enable address: 192.0.2.11 state: merged @@ -255,9 +255,9 @@ Examples vyos.vyos.vyos_lldp_global: config: legacy_protocols: - - edp - - sonmp - - cdp + - edp + - sonmp + - cdp address: 192.0.2.14 state: replaced # @@ -484,7 +484,7 @@ Examples address: 192.0.2.17 enable: true legacy_protocols: - - cdp + - cdp state: rendered # # diff --git a/docs/vyos.vyos.vyos_lldp_interfaces_module.rst b/docs/vyos.vyos.vyos_lldp_interfaces_module.rst index fffa1c2..d46c506 100644 --- a/docs/vyos.vyos.vyos_lldp_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_lldp_interfaces_module.rst @@ -382,22 +382,22 @@ Examples - name: Merge provided configuration with device configuration vyos.vyos.vyos_lldp_interfaces: config: - - name: eth1 - location: - civic_based: - country_code: US - ca_info: - - ca_type: 0 - ca_value: ENGLISH - - - name: eth2 - location: - coordinate_based: - altitude: 2200 - datum: WGS84 - longitude: 222.267255W - latitude: 33.524449N + - name: eth1 + location: + civic_based: + country_code: US + ca_info: + - ca_type: 0 + ca_value: ENGLISH + - name: eth2 + location: + coordinate_based: + altitude: 2200 + datum: WGS84 + longitude: 222.267255W + latitude: 33.524449N state: merged + # # # ------------------------- @@ -473,24 +473,25 @@ Examples # set service lldp interface eth2 location coordinate-based latitude '33.524449N' # set service lldp interface eth2 location coordinate-based longitude '222.267255W' # - - name: Replace device configurations of listed LLDP interfaces with provided configurations + - name: >- + Replace device configurations of listed LLDP interfaces with provided + configurations vyos.vyos.vyos_lldp_interfaces: config: - - name: eth2 - location: - civic_based: - country_code: US - ca_info: - - ca_type: 0 - ca_value: ENGLISH - - - name: eth1 - location: - coordinate_based: - altitude: 2200 - datum: WGS84 - longitude: 222.267255W - latitude: 33.524449N + - name: eth2 + location: + civic_based: + country_code: US + ca_info: + - ca_type: 0 + ca_value: ENGLISH + - name: eth1 + location: + coordinate_based: + altitude: 2200 + datum: WGS84 + longitude: 222.267255W + latitude: 33.524449N state: replaced # # @@ -599,9 +600,9 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_lldp_interfaces: config: - - name: eth2 - location: - elin: 0000000911 + - name: eth2 + location: + elin: 0000000911 state: overridden # @@ -674,7 +675,7 @@ Examples - name: Delete lldp interface attributes of given interfaces. vyos.vyos.vyos_lldp_interfaces: config: - - name: eth2 + - name: eth2 state: deleted # # @@ -765,21 +766,22 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_lldp_interfaces: config: - - name: eth1 - location: - civic_based: - country_code: US - ca_info: - - ca_type: 0 - ca_value: ENGLISH - - name: eth2 - location: - coordinate_based: - altitude: 2200 - datum: WGS84 - longitude: 222.267255W - latitude: 33.524449N + - name: eth1 + location: + civic_based: + country_code: US + ca_info: + - ca_type: 0 + ca_value: ENGLISH + - name: eth2 + location: + coordinate_based: + altitude: 2200 + datum: WGS84 + longitude: 222.267255W + latitude: 33.524449N state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_logging_global_module.rst b/docs/vyos.vyos.vyos_logging_global_module.rst index 0ee2505..16a7722 100644 --- a/docs/vyos.vyos.vyos_logging_global_module.rst +++ b/docs/vyos.vyos.vyos_logging_global_module.rst @@ -1046,15 +1046,15 @@ Examples users: - username: vyos facilities: - - facility: local7 - severity: debug + - facility: local7 + severity: debug global_params: archive: file_num: 2 size: 111 facilities: - - facility: cron - severity: debug + - facility: cron + severity: debug marker_interval: 111 preserve_fqdn: true state: merged @@ -1222,10 +1222,11 @@ Examples users: - username: paul facilities: - - facility: local7 - severity: err + - facility: local7 + severity: err state: replaced + # Commands Fired: # --------------- diff --git a/docs/vyos.vyos.vyos_logging_module.rst b/docs/vyos.vyos.vyos_logging_module.rst index 969190b..b29b064 100644 --- a/docs/vyos.vyos.vyos_logging_module.rst +++ b/docs/vyos.vyos.vyos_logging_module.rst @@ -274,16 +274,29 @@ Examples - name: Add logging aggregate vyos.vyos.vyos_logging: aggregate: - - {dest: file, name: test1, facility: all, level: info} - - {dest: file, name: test2, facility: news, level: debug} + - dest: file + name: test1 + facility: all + level: info + - dest: file + name: test2 + facility: news + level: debug state: present - name: Remove logging aggregate vyos.vyos.vyos_logging: aggregate: - - {dest: console, facility: all, level: info} - - {dest: console, facility: daemon, level: warning} - - {dest: file, name: test2, facility: news, level: debug} + - dest: console + facility: all + level: info + - dest: console + facility: daemon + level: warning + - dest: file + name: test2 + facility: news + level: debug state: absent diff --git a/docs/vyos.vyos.vyos_ntp_global_module.rst b/docs/vyos.vyos.vyos_ntp_global_module.rst index aea39b1..d2606f8 100644 --- a/docs/vyos.vyos.vyos_ntp_global_module.rst +++ b/docs/vyos.vyos.vyos_ntp_global_module.rst @@ -220,18 +220,18 @@ Examples - 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: - # # ------------- + 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" @@ -311,14 +311,14 @@ Examples - 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 + allow_clients: + - 10.6.6.0/24 + listen_addresses: + - 10.1.3.1 + servers: + - server: 203.0.113.0 + options: + - prefer state: replaced @@ -424,8 +424,6 @@ Examples # set system ntp server time3.vyos.net # vyos@vyos:~$ - - # # ------------------- # # 3. Using overridden # # ------------------- @@ -441,30 +439,28 @@ Examples # set system ntp server time3.vyos.net # vyos@vyos:~$ - # # Task - # # ------------- + # 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 - - + 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: # # ------------- @@ -558,11 +554,8 @@ Examples # set system ntp server time3.vyos.net # vyos@vyos:~$ - - - # # ------------------- - # # 4. Using gathered - # # ------------------- + # 4. Using gathered + # ------------------- # # Before state: # # ------------- @@ -579,11 +572,11 @@ Examples # set system ntp server time3.vyos.net # vyos@vyos:~$ - # # Task - # # ------------- + # Task + # ------------- - name: Gather ntp config vyos.vyos.vyos_ntp_global: - state: gathered + state: gathered # # Task output: # # ------------- @@ -748,32 +741,27 @@ Examples # set system ntp server time3.vyos.net # vyos@vyos:~$ - # # Task - # # ------------- + # 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 - + 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: # # ------------- @@ -807,12 +795,12 @@ Examples # "set system ntp server time2.vyos.net", # "set system ntp server time3.vyos.net" - # # Task: - # # ------------- + # Task: + # ------------- - name: Parse externally provided ntp configuration vyos.vyos.vyos_ntp_global: - running_config: "{{ lookup('file', './sample_config.cfg') }}" - state: parsed + running_config: "{{ lookup('file', './sample_config.cfg') }}" + state: parsed # # Task output: # # ------------- diff --git a/docs/vyos.vyos.vyos_ospf_interfaces_module.rst b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst index c2c5db6..1c4b226 100644 --- a/docs/vyos.vyos.vyos_ospf_interfaces_module.rst +++ b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst @@ -471,29 +471,29 @@ Examples # @vyos:~$ show configuration commands | match "ospf" - - name: Merge provided configuration with device configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth1" - address_family: - - afi: "ipv4" - transmit_delay: 50 - priority: 26 - network: "point-to-point" - - afi: "ipv6" - dead_interval: 39 - - name: "bond2" - address_family: - - afi: "ipv4" - transmit_delay: 45 - bandwidth: 70 - authentication: - md5_key: - key_id: 10 - key: "1111111111232345" - - afi: "ipv6" - passive: True - state: merged + - name: Merge provided configuration with device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + transmit_delay: 50 + priority: 26 + network: "point-to-point" + - afi: "ipv6" + dead_interval: 39 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + bandwidth: 70 + authentication: + md5_key: + key_id: 10 + key: "1111111111232345" + - afi: "ipv6" + passive: true + state: merged # After State: # -------------- @@ -580,9 +580,6 @@ Examples # "set interfaces bonding bond2 ipv6 ospfv3 passive" # ], - - - # Using replaced: # Before State: @@ -598,22 +595,22 @@ Examples # set interfaces ethernet eth1 ip ospf transmit-delay '50' # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' - - name: Replace provided configuration with device configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth1" - address_family: - - afi: "ipv4" - cost: 100 - - afi: "ipv6" - ifmtu: 33 - - name: "bond2" - address_family: - - afi: "ipv4" - transmit_delay: 45 - - afi: "ipv6" - passive: True - state: replaced + - name: Replace provided configuration with device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + cost: 100 + - afi: "ipv6" + ifmtu: 33 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + - afi: "ipv6" + passive: true + state: replaced # After State: # ----------- @@ -742,17 +739,18 @@ Examples # set interfaces ethernet eth1 ipv6 ospfv3 ifmtu '33' # vyos@vyos:~$ - - name: Override device configuration with provided configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth0" - address_family: - - afi: "ipv4" - cost: 100 - - afi: "ipv6" - ifmtu: 33 - passive: True - state: overridden + - name: Override device configuration with provided configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth0" + address_family: + - afi: "ipv4" + cost: 100 + - afi: "ipv6" + ifmtu: 33 + passive: true + state: overridden + # After State: # ----------- @@ -871,11 +869,11 @@ Examples # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' # vyos@vyos:~$ - - name: Delete device configuration - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth0" - state: deleted + - name: Delete device configuration + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth0" + state: deleted # After State: # ----------- @@ -1018,10 +1016,10 @@ Examples # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' # - - name: parse configs - vyos.vyos.vyos_ospf_interfaces: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed + - name: parse configs + vyos.vyos.vyos_ospf_interfaces: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed # Module Execution: # ---------------- @@ -1082,29 +1080,29 @@ Examples # Using rendered: # -------------- - - name: Render - vyos.vyos.vyos_ospf_interfaces: - config: - - name: "eth1" - address_family: - - afi: "ipv4" - transmit_delay: 50 - priority: 26 - network: "point-to-point" - - afi: "ipv6" - dead_interval: 39 - - name: "bond2" - address_family: - - afi: "ipv4" - transmit_delay: 45 - bandwidth: 70 - authentication: - md5_key: - key_id: 10 - key: "1111111111232345" - - afi: "ipv6" - passive: True - state: rendered + - name: Render + vyos.vyos.vyos_ospf_interfaces: + config: + - name: "eth1" + address_family: + - afi: "ipv4" + transmit_delay: 50 + priority: 26 + network: "point-to-point" + - afi: "ipv6" + dead_interval: 39 + - name: "bond2" + address_family: + - afi: "ipv4" + transmit_delay: 45 + bandwidth: 70 + authentication: + md5_key: + key_id: 10 + key: "1111111111232345" + - afi: "ipv6" + passive: true + state: rendered # Module Execution: # ---------------- @@ -1137,9 +1135,9 @@ Examples # set interfaces ethernet eth1 ipv6 ospfv3 dead-interval '39' # vyos@vyos:~$ - - name: gather configs - vyos.vyos.vyos_ospf_interfaces: - state: gathered + - name: gather configs + vyos.vyos.vyos_ospf_interfaces: + state: gathered # Module Execution: # ----------------- diff --git a/docs/vyos.vyos.vyos_ospfv2_module.rst b/docs/vyos.vyos.vyos_ospfv2_module.rst index 5e71f11..a3270ed 100644 --- a/docs/vyos.vyos.vyos_ospfv2_module.rst +++ b/docs/vyos.vyos.vyos_ospfv2_module.rst @@ -1680,42 +1680,42 @@ Examples auto_cost: reference_bandwidth: 2 neighbor: - - neighbor_id: 192.0.11.12 - poll_interval: 10 - priority: 2 + - neighbor_id: 192.0.11.12 + poll_interval: 10 + priority: 2 redistribute: - - route_type: bgp - metric: 10 - metric_type: 2 + - route_type: bgp + metric: 10 + metric_type: 2 passive_interface: - - eth1 - - eth2 + - eth1 + - eth2 parameters: router_id: 192.0.1.1 opaque_lsa: true rfc1583_compatibility: true abr_type: cisco areas: - - area_id: '2' - area_type: - normal: true - authentication: plaintext-password - shortcut: enable - - area_id: '3' - area_type: - nssa: - set: true - - area_id: '4' - area_type: - stub: - default_cost: 20 - network: - - address: 192.0.2.0/24 - range: - - address: 192.0.3.0/24 - cost: 10 - - address: 192.0.4.0/24 - cost: 12 + - area_id: '2' + area_type: + normal: true + authentication: plaintext-password + shortcut: enable + - area_id: '3' + area_type: + nssa: + set: true + - area_id: '4' + area_type: + stub: + default_cost: 20 + network: + - address: 192.0.2.0/24 + range: + - address: 192.0.3.0/24 + cost: 10 + - address: 192.0.4.0/24 + cost: 12 state: merged # # @@ -1903,23 +1903,23 @@ Examples vyos.vyos.vyos_ospfv2: config: areas: - - area_id: '2' - area_type: - normal: true - authentication: plaintext-password - shortcut: enable - - area_id: '3' - area_type: - nssa: - set: false - - area_id: '4' - area_type: - stub: - default_cost: 20 - network: - - address: 192.0.2.0/24 - - address: 192.0.22.0/24 - - address: 192.0.32.0/24 + - area_id: '2' + area_type: + normal: true + authentication: plaintext-password + shortcut: enable + - area_id: '3' + area_type: + nssa: + set: false + - area_id: '4' + area_type: + stub: + default_cost: 20 + network: + - address: 192.0.2.0/24 + - address: 192.0.22.0/24 + - address: 192.0.32.0/24 state: merged # # @@ -2211,39 +2211,40 @@ Examples auto_cost: reference_bandwidth: 2 neighbor: - - neighbor_id: 192.0.11.12 - poll_interval: 10 - priority: 2 + - neighbor_id: 192.0.11.12 + poll_interval: 10 + priority: 2 redistribute: - - route_type: bgp - metric: 10 - metric_type: 2 + - route_type: bgp + metric: 10 + metric_type: 2 passive_interface: - - eth1 + - eth1 parameters: router_id: 192.0.1.1 opaque_lsa: true rfc1583_compatibility: true abr_type: cisco areas: - - area_id: '2' - area_type: - normal: true - authentication: plaintext-password - shortcut: enable - - area_id: '4' - area_type: - stub: - default_cost: 20 - network: - - address: 192.0.2.0/24 - - address: 192.0.12.0/24 - - address: 192.0.22.0/24 - - address: 192.0.32.0/24 - range: - - address: 192.0.42.0/24 - cost: 10 + - area_id: '2' + area_type: + normal: true + authentication: plaintext-password + shortcut: enable + - area_id: '4' + area_type: + stub: + default_cost: 20 + network: + - address: 192.0.2.0/24 + - address: 192.0.12.0/24 + - address: 192.0.22.0/24 + - address: 192.0.32.0/24 + range: + - address: 192.0.42.0/24 + cost: 10 state: replaced + # # # ------------------------- @@ -2504,42 +2505,42 @@ Examples auto_cost: reference_bandwidth: 2 neighbor: - - neighbor_id: 192.0.11.12 - poll_interval: 10 - priority: 2 + - neighbor_id: 192.0.11.12 + poll_interval: 10 + priority: 2 redistribute: - - route_type: bgp - metric: 10 - metric_type: 2 + - route_type: bgp + metric: 10 + metric_type: 2 passive_interface: - - eth1 - - eth2 + - eth1 + - eth2 parameters: router_id: 192.0.1.1 opaque_lsa: true rfc1583_compatibility: true abr_type: cisco areas: - - area_id: '2' - area_type: - normal: true - authentication: plaintext-password - shortcut: enable - - area_id: '3' - area_type: - nssa: - set: true - - area_id: '4' - area_type: - stub: - default_cost: 20 - network: - - address: 192.0.2.0/24 - range: - - address: 192.0.3.0/24 - cost: 10 - - address: 192.0.4.0/24 - cost: 12 + - area_id: '2' + area_type: + normal: true + authentication: plaintext-password + shortcut: enable + - area_id: '3' + area_type: + nssa: + set: true + - area_id: '4' + area_type: + stub: + default_cost: 20 + network: + - address: 192.0.2.0/24 + range: + - address: 192.0.3.0/24 + cost: 10 + - address: 192.0.4.0/24 + cost: 12 state: rendered # # diff --git a/docs/vyos.vyos.vyos_ospfv3_module.rst b/docs/vyos.vyos.vyos_ospfv3_module.rst index 5437f46..eb06234 100644 --- a/docs/vyos.vyos.vyos_ospfv3_module.rst +++ b/docs/vyos.vyos.vyos_ospfv3_module.rst @@ -362,21 +362,22 @@ Examples vyos.vyos.vyos_ospfv3: config: redistribute: - - route_type: bgp + - route_type: bgp parameters: router_id: 192.0.2.10 areas: - - area_id: '2' - export_list: export1 - import_list: import1 - range: - - address: 2001:db10::/32 - - address: 2001:db20::/32 - - address: 2001:db30::/32 - - area_id: '3' - range: - - address: 2001:db40::/32 + - area_id: '2' + export_list: export1 + import_list: import1 + range: + - address: '2001:db10::/32' + - address: '2001:db20::/32' + - address: '2001:db30::/32' + - area_id: '3' + range: + - address: '2001:db40::/32' state: merged + # # # ------------------------- @@ -468,21 +469,22 @@ Examples vyos.vyos.vyos_ospfv3: config: redistribute: - - route_type: bgp + - route_type: bgp parameters: router_id: 192.0.2.10 areas: - - area_id: '2' - export_list: export1 - import_list: import1 - range: - - address: 2001:db10::/32 - - address: 2001:db30::/32 - - address: 2001:db50::/32 - - area_id: '4' - range: - - address: 2001:db60::/32 + - area_id: '2' + export_list: export1 + import_list: import1 + range: + - address: '2001:db10::/32' + - address: '2001:db30::/32' + - address: '2001:db50::/32' + - area_id: '4' + range: + - address: '2001:db60::/32' state: replaced + # # # ------------------------- @@ -592,21 +594,22 @@ Examples vyos.vyos.vyos_ospfv3: config: redistribute: - - route_type: bgp + - route_type: bgp parameters: router_id: 192.0.2.10 areas: - - area_id: '2' - export_list: export1 - import_list: import1 - range: - - address: 2001:db10::/32 - - address: 2001:db20::/32 - - address: 2001:db30::/32 - - area_id: '3' - range: - - address: 2001:db40::/32 + - area_id: '2' + export_list: export1 + import_list: import1 + range: + - address: '2001:db10::/32' + - address: '2001:db20::/32' + - address: '2001:db30::/32' + - area_id: '3' + range: + - address: '2001:db40::/32' state: rendered + # # # ------------------------- diff --git a/docs/vyos.vyos.vyos_route_maps_module.rst b/docs/vyos.vyos.vyos_route_maps_module.rst index c548e9b..3135b60 100644 --- a/docs/vyos.vyos.vyos_route_maps_module.rst +++ b/docs/vyos.vyos.vyos_route_maps_module.rst @@ -1378,35 +1378,35 @@ Examples # vyos@vyos:~$ show configuration commands | match "set policy route-map" # vyos@vyos:~$ - - name: Merge the provided configuration with the existing running configuration - register: result - vyos.vyos.vyos_route_maps: &id001 - config: - - route_map: test1 - entries: - - sequence: 1 - description: "test" - action: permit - continue: 2 - on_match: - next: True - - route_map: test3 - entries: - - sequence: 1 - action: permit - match: - rpki: invalid - metric: 1 - peer: 192.0.2.32 - set: - local_preference: 4 - metric: 5 - metric_type: "type-1" - origin: egp - originator_id: 192.0.2.34 - tag: 5 - weight: 4 - state: merged + - name: Merge the provided configuration with the existing running configuration + register: result + vyos.vyos.vyos_route_maps: &id001 + config: + - route_map: test1 + entries: + - sequence: 1 + description: "test" + action: permit + continue: 2 + on_match: + next: true + - route_map: test3 + entries: + - sequence: 1 + action: permit + match: + rpki: invalid + metric: 1 + peer: 192.0.2.32 + set: + local_preference: 4 + metric: 5 + metric_type: "type-1" + origin: egp + originator_id: 192.0.2.34 + tag: 5 + weight: 4 + state: merged # After State # vyos@vyos:~$ show configuration commands | match "set policy route-maps" # set policy route-map test1 rule 1 description test @@ -2027,7 +2027,6 @@ Examples # "set policy route-map test3 rule 1 match metric 3", # "set policy route-map test3 rule 1 match peer 192.0.2.35" # ], - # diff --git a/docs/vyos.vyos.vyos_snmp_server_module.rst b/docs/vyos.vyos.vyos_snmp_server_module.rst index dfef282..325f413 100644 --- a/docs/vyos.vyos.vyos_snmp_server_module.rst +++ b/docs/vyos.vyos.vyos_snmp_server_module.rst @@ -1235,30 +1235,29 @@ Examples # vyos@vyos:~$ show configuration commands | grep snmp # vyos@vyos:~$ - - name: Merge provided configuration with device configuration - vyos.vyos.vyos_snmp_server: - config: - communities: - - name: "switches" - authorization_type: "rw" - - name: "bridges" - clients: ["1.1.1.1", "12.1.1.10"] - contact: "admin2@ex.com" - listen_addresses: - - address: "20.1.1.1" - - address: "100.1.2.1" - port: 33 - snmp_v3: - users: - - user: admin_user - authentication: - plaintext_key: "abc1234567" - type: "sha" - privacy: - plaintext_key: "abc1234567" - type: "aes" - - state: merged + - name: Merge provided configuration with device configuration + vyos.vyos.vyos_snmp_server: + config: + communities: + - name: "switches" + authorization_type: "rw" + - name: "bridges" + clients: ["1.1.1.1", "12.1.1.10"] + contact: "admin2@ex.com" + listen_addresses: + - address: "20.1.1.1" + - address: "100.1.2.1" + port: 33 + snmp_v3: + users: + - user: admin_user + authentication: + plaintext_key: "abc1234567" + type: "sha" + privacy: + plaintext_key: "abc1234567" + type: "aes" + state: merged # After State: @@ -1333,9 +1332,10 @@ Examples # ], # - # using Replaced: + # Using replaced # Before State + # ------------- # vyos@vyos:~$ show configuration commands | grep snmp # set service snmp community bridges client '1.1.1.1' # set service snmp community bridges client '12.1.1.10' @@ -1347,43 +1347,42 @@ Examples # set service snmp v3 user admin_user auth type 'sha' # set service snmp v3 user admin_user privacy plaintext-key 'abc1234567' # set service snmp v3 user admin_user privacy type 'aes' - # vyos@vyos:~$ - - name: Replace - vyos.vyos.vyos_snmp_server: - config: - communities: - - name: "bridges" - networks: ["1.1.1.0/24", "12.1.1.0/24"] - location: "RDU, NC" - listen_addresses: - - address: "100.1.2.1" - port: 33 - snmp_v3: - groups: - - group: "default" - view: "default" - users: - - user: admin_user - authentication: - plaintext_key: "abc1234567" - type: "sha" - privacy: - plaintext_key: "abc1234567" - type: "aes" - group: "default" - - user: guest_user2 - authentication: - plaintext_key: "opq1234567" - type: "sha" - privacy: - plaintext_key: "opq1234567" - type: "aes" - views: - - view: "default" - oid: 1 - - state: replaced + - name: Replace SNMP Server configuration + vyos.vyos.vyos_snmp_server: + config: + communities: + - name: "bridges" + networks: ["1.1.1.0/24", "12.1.1.0/24"] + location: "RDU, NC" + listen_addresses: + - address: "100.1.2.1" + port: 33 + snmp_v3: + groups: + - group: "default" + view: "default" + users: + - user: admin_user + authentication: + plaintext_key: "abc1234567" + type: "sha" + privacy: + plaintext_key: "abc1234567" + type: "aes" + group: "default" + - user: guest_user2 + authentication: + plaintext_key: "opq1234567" + type: "sha" + privacy: + plaintext_key: "opq1234567" + type: "aes" + views: + - view: "default" + oid: 1 + + state: replaced # After State: # vyos@vyos:~$ show configuration commands | grep snmp @@ -1539,43 +1538,41 @@ Examples # set service snmp v3 user admin_user auth type 'sha' # set service snmp v3 user admin_user privacy plaintext-key 'abc1234567' # set service snmp v3 user admin_user privacy type 'aes' - # vyos@vyos:~$ - - name: Override config - vyos.vyos.vyos_snmp_server: - config: - communities: - - name: "bridges" - networks: ["1.1.1.0/24", "12.1.1.0/24"] - location: "RDU, NC" - listen_addresses: - - address: "100.1.2.1" - port: 33 - snmp_v3: - groups: - - group: "default" - view: "default" - users: - - user: admin_user - authentication: - plaintext_key: "abc1234567" - type: "sha" - privacy: - plaintext_key: "abc1234567" - type: "aes" - group: "default" - - user: guest_user2 - authentication: - plaintext_key: "opq1234567" - type: "sha" - privacy: - plaintext_key: "opq1234567" - type: "aes" - views: - - view: "default" - oid: 1 - - state: overridden + - name: Override SNMP server config + vyos.vyos.vyos_snmp_server: + config: + communities: + - name: "bridges" + networks: ["1.1.1.0/24", "12.1.1.0/24"] + location: "RDU, NC" + listen_addresses: + - address: "100.1.2.1" + port: 33 + snmp_v3: + groups: + - group: "default" + view: "default" + users: + - user: admin_user + authentication: + plaintext_key: "abc1234567" + type: "sha" + privacy: + plaintext_key: "abc1234567" + type: "aes" + group: "default" + - user: guest_user2 + authentication: + plaintext_key: "opq1234567" + type: "sha" + privacy: + plaintext_key: "opq1234567" + type: "aes" + views: + - view: "default" + oid: 1 + state: overridden # After State: # vyos@vyos:~$ show configuration commands | grep snmp @@ -1738,11 +1735,10 @@ Examples # set service snmp v3 user guest_user2 privacy plaintext-key 'opq1234567' # set service snmp v3 user guest_user2 privacy type 'aes' # set service snmp v3 view default oid 1 - # vyos@vyos:~$ - - name: Delete Config - vyos.vyos.vyos_snmp_server: - state: deleted + - name: Delete Config + vyos.vyos.vyos_snmp_server: + state: deleted # After State: # vyos@vyos:~$ show configuration commands | grep snmp @@ -1816,30 +1812,29 @@ Examples # ], # Using rendered: - - name: Render provided configuration - vyos.vyos.vyos_snmp_server: - config: - communities: - - name: "switches" - authorization_type: "rw" - - name: "bridges" - clients: ["1.1.1.1", "12.1.1.10"] - contact: "admin2@ex.com" - listen_addresses: - - address: "20.1.1.1" - - address: "100.1.2.1" - port: 33 - snmp_v3: - users: - - user: admin_user - authentication: - plaintext_key: "abc1234567" - type: "sha" - privacy: - plaintext_key: "abc1234567" - type: "aes" - - state: rendered + - name: Render provided configuration + vyos.vyos.vyos_snmp_server: + config: + communities: + - name: "switches" + authorization_type: "rw" + - name: "bridges" + clients: ["1.1.1.1", "12.1.1.10"] + contact: "admin2@ex.com" + listen_addresses: + - address: "20.1.1.1" + - address: "100.1.2.1" + port: 33 + snmp_v3: + users: + - user: admin_user + authentication: + plaintext_key: "abc1234567" + type: "sha" + privacy: + plaintext_key: "abc1234567" + type: "aes" + state: rendered # Module Execution: # "rendered": [ @@ -1870,11 +1865,10 @@ Examples # set service snmp v3 user admin_user auth type 'sha' # set service snmp v3 user admin_user privacy plaintext-key 'abc1234567' # set service snmp v3 user admin_user privacy type 'aes' - # vyos@vyos:~$ - - name: gather configs - vyos.vyos.vyos_snmp_server: - state: gathered + - name: Gather SNMP server config + vyos.vyos.vyos_snmp_server: + state: gathered # Module Execution: # "gathered": { @@ -1941,10 +1935,10 @@ Examples # set service snmp v3 user vyos privacy type 'aes' # set service snmp v3 view default oid 1 - - name: parse configs - vyos.vyos.vyos_snmp_server: - running_config: "{{ lookup('file', './_parsed_snmp.cfg') }}" - state: parsed + - name: Parse SNMP server config + vyos.vyos.vyos_snmp_server: + running_config: "{{ lookup('file', './_parsed_snmp.cfg') }}" + state: parsed # Module Execution: # "parsed": { diff --git a/docs/vyos.vyos.vyos_static_routes_module.rst b/docs/vyos.vyos.vyos_static_routes_module.rst index d1ed834..4207add 100644 --- a/docs/vyos.vyos.vyos_static_routes_module.rst +++ b/docs/vyos.vyos.vyos_static_routes_module.rst @@ -355,25 +355,26 @@ Examples - name: Merge the provided configuration with the existing running configuration vyos.vyos.vyos_static_routes: config: - - address_families: - - afi: ipv4 - routes: - - dest: 192.0.2.32/28 - blackhole_config: - type: blackhole - next_hops: - - forward_router_address: 192.0.2.6 - - forward_router_address: 192.0.2.7 - - address_families: - - afi: ipv6 - routes: - - dest: 2001:db8:1000::/36 - blackhole_config: - distance: 2 - next_hops: - - forward_router_address: 2001:db8:2000:2::1 - - forward_router_address: 2001:db8:2000:2::2 + - address_families: + - afi: ipv4 + routes: + - dest: 192.0.2.32/28 + blackhole_config: + type: blackhole + next_hops: + - forward_router_address: 192.0.2.6 + - forward_router_address: 192.0.2.7 + - address_families: + - afi: ipv6 + routes: + - dest: '2001:db8:1000::/36' + blackhole_config: + distance: 2 + next_hops: + - forward_router_address: '2001:db8:2000:2::1' + - forward_router_address: '2001:db8:2000:2::2' state: merged + # # # ------------------------- @@ -469,16 +470,16 @@ Examples - name: Replace device configurations of listed static routes with provided configurations vyos.vyos.vyos_static_routes: config: - - address_families: - - afi: ipv4 - routes: - - dest: 192.0.2.32/28 - blackhole_config: - distance: 2 - next_hops: - - forward_router_address: 192.0.2.7 - enabled: false - - forward_router_address: 192.0.2.9 + - address_families: + - afi: ipv4 + routes: + - dest: 192.0.2.32/28 + blackhole_config: + distance: 2 + next_hops: + - forward_router_address: 192.0.2.7 + enabled: false + - forward_router_address: 192.0.2.9 state: replaced # # @@ -645,12 +646,12 @@ Examples - name: Overrides all device configuration with provided configuration vyos.vyos.vyos_static_routes: config: - - address_families: - - afi: ipv4 - routes: - - dest: 198.0.2.48/28 - next_hops: - - forward_router_address: 192.0.2.18 + - address_families: + - afi: ipv4 + routes: + - dest: 198.0.2.48/28 + next_hops: + - forward_router_address: 192.0.2.18 state: overridden # # @@ -755,9 +756,9 @@ Examples - name: Delete static route based on afi. vyos.vyos.vyos_static_routes: config: - - address_families: - - afi: ipv4 - - afi: ipv6 + - address_families: + - afi: ipv4 + - afi: ipv6 state: deleted # # @@ -906,24 +907,24 @@ Examples - name: Render the commands for provided configuration vyos.vyos.vyos_static_routes: config: - - address_families: - - afi: ipv4 - routes: - - dest: 192.0.2.32/28 - blackhole_config: - type: blackhole - next_hops: - - forward_router_address: 192.0.2.6 - - forward_router_address: 192.0.2.7 - - address_families: - - afi: ipv6 - routes: - - dest: 2001:db8:1000::/36 - blackhole_config: - distance: 2 - next_hops: - - forward_router_address: 2001:db8:2000:2::1 - - forward_router_address: 2001:db8:2000:2::2 + - address_families: + - afi: ipv4 + routes: + - dest: 192.0.2.32/28 + blackhole_config: + type: blackhole + next_hops: + - forward_router_address: 192.0.2.6 + - forward_router_address: 192.0.2.7 + - address_families: + - afi: ipv6 + routes: + - dest: 2001:db8:1000::/36 + blackhole_config: + distance: 2 + next_hops: + - forward_router_address: 2001:db8:2000:2::1 + - forward_router_address: 2001:db8:2000:2::2 state: rendered # # diff --git a/docs/vyos.vyos.vyos_system_module.rst b/docs/vyos.vyos.vyos_system_module.rst index b5524e7..ba0fd01 100644 --- a/docs/vyos.vyos.vyos_system_module.rst +++ b/docs/vyos.vyos.vyos_system_module.rst @@ -148,8 +148,8 @@ Examples - name: configure domain search suffixes vyos.vyos.vyos_system: domain_search: - - sub1.example.com - - sub2.example.com + - sub1.example.com + - sub2.example.com diff --git a/docs/vyos.vyos.vyos_user_module.rst b/docs/vyos.vyos.vyos_user_module.rst index 8fb47b8..5f0ad83 100644 --- a/docs/vyos.vyos.vyos_user_module.rst +++ b/docs/vyos.vyos.vyos_user_module.rst @@ -301,12 +301,12 @@ Examples state: present - name: remove all users except admin vyos.vyos.vyos_user: - purge: yes + purge: true - name: set multiple users to level operator vyos.vyos.vyos_user: aggregate: - - name: netop - - name: netend + - name: netop + - name: netend level: operator state: present - name: Change Password for User netop diff --git a/docs/vyos.vyos.vyos_vlan_module.rst b/docs/vyos.vyos.vyos_vlan_module.rst index 601cda9..1d5c877 100644 --- a/docs/vyos.vyos.vyos_vlan_module.rst +++ b/docs/vyos.vyos.vyos_vlan_module.rst @@ -331,8 +331,8 @@ Examples vyos.vyos.vyos_vlan: vlan_id: 100 interfaces: - - eth1 - - eth2 + - eth1 + - eth2 - name: Configure virtual interface address vyos.vyos.vyos_vlan: @@ -345,14 +345,14 @@ Examples vlan_id: 100 interfaces: eth0 associated_interfaces: - - eth0 + - eth0 - name: vlan intent check vyos.vyos.vyos_vlan: vlan_id: 100 associated_interfaces: - - eth3 - - eth4 + - eth3 + - eth4 - name: Delete vlan vyos.vyos.vyos_vlan: |