diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:27 +0000 |
commit | 3b0807ad7b283c46c21862eb826dcbb4ad04e5e2 (patch) | |
tree | 6461ea75f03eca87a5a90c86c3c9a787a6ad037e /ansible_collections/arista/eos/docs | |
parent | Adding debian version 7.7.0+dfsg-3. (diff) | |
download | ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.tar.xz ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/arista/eos/docs')
31 files changed, 6363 insertions, 6422 deletions
diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_acl_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_acl_interfaces_module.rst index bdc7d5234..d4220232f 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_acl_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_acl_interfaces_module.rst @@ -231,16 +231,16 @@ Examples - name: Merge module attributes of given access-groups arista.eos.eos_acl_interfaces: config: - - name: Ethernet2 - access_groups: - - afi: ipv4 - acls: - name: acl01 - direction: in - - afi: ipv6 - acls: - name: acl03 - direction: out + - name: Ethernet2 + access_groups: + - afi: ipv4 + acls: + name: acl01 + direction: in + - afi: ipv6 + acls: + name: acl03 + direction: out state: merged # Commands Fired: @@ -278,12 +278,12 @@ Examples - name: Replace module attributes of given access-groups arista.eos.eos_acl_interfaces: config: - - name: Ethernet2 - access_groups: - - afi: ipv4 - acls: - name: acl01 - direction: out + - name: Ethernet2 + access_groups: + - afi: ipv4 + acls: + name: acl01 + direction: out state: replaced # Commands Fired: @@ -322,12 +322,12 @@ Examples - name: Override module attributes of given access-groups arista.eos.eos_acl_interfaces: config: - - name: Ethernet2 - access_groups: - - afi: ipv4 - acls: - name: acl01 - direction: out + - name: Ethernet2 + access_groups: + - afi: ipv4 + acls: + name: acl01 + direction: out state: overridden # Commands Fired: @@ -367,16 +367,16 @@ Examples - name: Delete module attributes of given access-groups arista.eos.eos_acl_interfaces: config: - - name: Ethernet2 - access_groups: - - afi: ipv4 - acls: - name: acl01 - direction: in - - afi: ipv6 - acls: - name: acl03 - direction: out + - name: Ethernet2 + access_groups: + - afi: ipv4 + acls: + name: acl01 + direction: in + - afi: ipv6 + acls: + name: acl03 + direction: out state: deleted # Commands Fired: @@ -445,12 +445,12 @@ Examples - name: Delete acls under afi arista.eos.eos_acl_interfaces: config: - - name: Ethernet3 - access_groups: - - afi: ipv4 - - name: Ethernet2 - access_groups: - - afi: ipv6 + - name: Ethernet3 + access_groups: + - afi: ipv4 + - name: Ethernet2 + access_groups: + - afi: ipv6 state: deleted # Commands Fired: diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_acls_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_acls_module.rst index 5ca0e4a17..93136a293 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_acls_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_acls_module.rst @@ -2857,17 +2857,17 @@ Examples - name: Merge provided configuration with device configuration arista.eos.eos_acls: config: - - afi: ipv4 - acls: - - name: test1 - aces: - - sequence: 35 - grant: deny - protocol: ospf - source: - subnet_address: 20.0.0.0/8 - destination: - any: true + - afi: ipv4 + acls: + - name: test1 + aces: + - sequence: 35 + grant: deny + protocol: ospf + source: + subnet_address: 20.0.0.0/8 + destination: + any: true state: merged # After state: @@ -2899,14 +2899,14 @@ Examples - name: Merge to update the given configuration with an existing ace arista.eos.eos_acls: config: - - afi: ipv4 - acls: - - name: test1 - aces: - - sequence: 35 - log: true - ttl: - eq: 33 + - afi: ipv4 + acls: + - name: test1 + aces: + - sequence: 35 + log: true + ttl: + eq: 33 state: merged # After state: @@ -2939,22 +2939,20 @@ Examples # ipv6 access-list test2 # 10 deny icmpv6 any any reject-route hop-limit eq 20 - - - name: Replace device configuration with provided configuration arista.eos.eos_acls: config: - - afi: ipv4 - acls: - - name: test1 - aces: - - sequence: 35 - grant: permit - protocol: ospf - source: - subnet_address: 20.0.0.0/8 - destination: - any: true + - afi: ipv4 + acls: + - name: test1 + aces: + - sequence: 35 + grant: permit + protocol: ospf + source: + subnet_address: 20.0.0.0/8 + destination: + any: true state: replaced # After state: @@ -2970,7 +2968,6 @@ Examples # ipv6 access-list test2 # 10 deny icmpv6 any any reject-route hop-limit eq 20 - # Using overridden # Before state: @@ -2989,21 +2986,20 @@ Examples # 10 deny icmpv6 any any reject-route hop-limit eq 20 - - name: override device configuration with provided configuration arista.eos.eos_acls: config: - - afi: ipv4 - acls: - - name: test1 - aces: - - sequence: 35 - grant: permit - protocol: ospf - source: - subnet_address: 20.0.0.0/8 - destination: - any: true + - afi: ipv4 + acls: + - name: test1 + aces: + - sequence: 35 + grant: permit + protocol: ospf + source: + subnet_address: 20.0.0.0/8 + destination: + any: true state: overridden # After state: @@ -3032,9 +3028,9 @@ Examples - name: Delete provided configuration arista.eos.eos_acls: config: - - afi: ipv4 - acls: - - name: test1 + - afi: ipv4 + acls: + - name: test1 state: deleted # After state: @@ -3059,64 +3055,62 @@ Examples # returns: - # arista.eos.eos_acls: # config: - # - afi: "ipv4" - # acls: - # - name: test1 - # aces: - # - sequence: 35 - # grant: "deny" - # protocol: "ospf" - # source: - # subnet_address: 20.0.0.0/8 - # destination: - # any: true - # - afi: "ipv6" - # acls: - # - name: test2 - # aces: - # - sequence: 40 - # grant: "permit" - # vlan: "55 0xE2" - # protocol: "icmpv6" - # log: true - # source: - # any: true - # destination: - # any: true - + # - afi: "ipv4" + # acls: + # - name: test1 + # aces: + # - sequence: 35 + # grant: "deny" + # protocol: "ospf" + # source: + # subnet_address: 20.0.0.0/8 + # destination: + # any: true + # - afi: "ipv6" + # acls: + # - name: test2 + # aces: + # - sequence: 40 + # grant: "permit" + # vlan: "55 0xE2" + # protocol: "icmpv6" + # log: true + # source: + # any: true + # destination: + # any: true # using rendered - name: Delete provided configuration arista.eos.eos_acls: config: - - afi: ipv4 - acls: - - name: test1 - aces: - - sequence: 35 - grant: deny - protocol: ospf - source: - subnet_address: 20.0.0.0/8 - destination: - any: true - - afi: ipv6 - acls: - - name: test2 - aces: - - sequence: 40 - grant: permit - vlan: 55 0xE2 - protocol: icmpv6 - log: true - source: - any: true - destination: - any: true + - afi: ipv4 + acls: + - name: test1 + aces: + - sequence: 35 + grant: deny + protocol: ospf + source: + subnet_address: 20.0.0.0/8 + destination: + any: true + - afi: ipv6 + acls: + - name: test2 + aces: + - sequence: 40 + grant: permit + vlan: 55 0xE2 + protocol: icmpv6 + log: true + source: + any: true + destination: + any: true state: rendered # returns: @@ -3126,7 +3120,6 @@ Examples # ip access-list test2 # 40 permit vlan 55 0xE2 icmpv6 any any log - # Using Parsed # parsed_acls.cfg diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_address_family_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_address_family_module.rst index 08ef1f037..cc64946ab 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_address_family_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_address_family_module.rst @@ -1040,45 +1040,101 @@ Examples .. code-block:: yaml - # Using merged - - # Before state + # Using Merged + # Before state: + # ------------- # veos(config)#show running-config | section bgp # veos(config)# - - name: Merge provided configuration with device configuration - arista.eos.eos_bgp_address_family: - config: - as_number: "10" - address_family: - - afi: "ipv4" - redistribute: - - protocol: "ospfv3" - ospf_route: "external" - network: - - address: "1.1.1.0/24" - - address: "1.5.1.0/24" - route_map: "MAP01" - - afi: "ipv6" - bgp_params: - additional_paths: "receive" - neighbor: - - peer: "peer2" - default_originate: - always: True - - afi: "ipv6" - redistribute: - - protocol: "isis" - isis_level: "level-2" - route_target: - mode: "export" - target: "33:11" - vrf: "vrft" - state: merged + - name: Merge provided configuration with device configuration + arista.eos.eos_bgp_address_family: + config: + as_number: "10" + address_family: + - afi: "ipv4" + redistribute: + - protocol: "ospfv3" + ospf_route: "external" + network: + - address: "1.1.1.0/24" + - address: "1.5.1.0/24" + route_map: "MAP01" + - afi: "ipv6" + bgp_params: + additional_paths: "receive" + neighbor: + - peer: "peer2" + default_originate: + always: true + - afi: "ipv6" + redistribute: + - protocol: "isis" + isis_level: "level-2" + route_target: + mode: "export" + target: "33:11" + vrf: "vrft" + state: merged + + + # Task output: + # ------------ + # before: {} + # + # commands: + # - router bgp 10 + # - address-family ipv4 + # - redistribute ospfv3 match external + # - network 1.1.1.0/24 + # - network 1.5.1.0/24 route-map MAP01 + # - exit + # - address-family ipv6 + # - neighbor peer2 default-originate always + # - bgp additional-paths receive + # - exit + # - vrf vrft + # - address-family ipv6 + # - redistribute isis level-2 + # - route-target export 33:11 + # - exit + # - exit + # + # after: + # address_family: + # - afi: ipv4 + # neighbor: + # - activate: true + # peer: 1.1.1.1 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # bgp_params: + # additional_paths: receive + # neighbor: + # - activate: true + # default_originate: + # always: true + # peer: peer2 + # - afi: ipv6 + # redistribute: + # - isis_level: level-2 + # protocol: isis + # route_target: + # action: export + # target: '33:11' + # vrf: vrft + # as_number: '10' + # "before": {}, + # "changed": true, # After state: - + # ------------ # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1100,77 +1156,11 @@ Examples # address-family ipv6 # route-target export 33:11 # redistribute isis level-2 - # veos(config-router-bgp)# - - # Module Execution: - - # "after": { - # "address_family": [ - # { - # "afi": "ipv4", - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "isis_level": "level-2", - # "protocol": "isis" - # } - # ], - # "route_target": { - # "mode": "export", - # "target": "33:11" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "before": {}, - # "changed": true, - # "commands": [ - # "router bgp 10", - # "address-family ipv4", - # "redistribute ospfv3 match external", - # "network 1.1.1.0/24", - # "network 1.5.1.0/24 route-map MAP01", - # "exit", - # "address-family ipv6", - # "neighbor peer2 default-originate always", - # "bgp additional-paths receive", - # "exit", - # "vrf vrft", - # "address-family ipv6", - # "redistribute isis level-2", - # "route-target export 33:11", - # "exit", - # "exit" - # ], - - # Using replaced: - - # Before State: + # Using replaced + + # Before state: + # ------------- # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1192,27 +1182,101 @@ Examples # address-family ipv6 # route-target export 33:11 # redistribute isis level-2 - # veos(config-router-bgp)# - # - - name: Replace - arista.eos.eos_bgp_address_family: - config: - as_number: "10" - address_family: - - afi: "ipv6" - vrf: "vrft" - redistribute: - - protocol: "ospfv3" - ospf_route: "external" - - afi: "ipv6" - redistribute: - - protocol: "isis" - isis_level: "level-2" - state: replaced - - # After State: + - name: Replace running config section with provided config + arista.eos.eos_bgp_address_family: + config: + as_number: "10" + address_family: + - afi: "ipv6" + vrf: "vrft" + redistribute: + - protocol: "ospfv3" + ospf_route: "external" + - afi: "ipv6" + redistribute: + - protocol: "isis" + isis_level: "level-2" + state: replaced + + # Task output: + # ------------ + # before: + # address_family: + # - afi: ipv4 + # neighbor: + # - activate: true + # peer: 1.1.1.1 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # bgp_params: + # additional_paths: receive + # neighbor: + # - activate: true + # default_originate: + # always: true + # peer: peer2 + # - afi: ipv6 + # redistribute: + # - isis_level: level-2 + # protocol: isis + # route_target: + # action: export + # target: '33:11' + # vrf: vrft + # as_number: '10' + # + # commands: + # - router bgp 10 + # - vrf vrft + # - address-family ipv6 + # - redistribute ospfv3 match external + # - no redistribute isis level-2 + # - no route-target export 33:11 + # - exit + # - exit + # - address-family ipv6 + # - redistribute isis level-2 + # - no neighbor peer2 activate + # - no bgp additional-paths receive + # - exit + # + # after: + # address_family: + # - afi: ipv4 + # neighbor: + # - activate: true + # peer: 1.1.1.1 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # redistribute: + # - isis_level: level-2 + # protocol: isis + # - afi: ipv6 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # vrf: vrft + # as_number: '10' + # After state: + # ------------ # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1232,145 +1296,11 @@ Examples # vrf vrft # address-family ipv6 # redistribute ospfv3 match external - # veos(config-router-bgp)# - # - # - # # Module Execution: - # - # "after": { - # "address_family": [ - # { - # "afi": "ipv4", - # "neighbor": [ - # { - # "activate": true, - # "peer": "1.1.1.1" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "redistribute": [ - # { - # "isis_level": "level-2", - # "protocol": "isis" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ], - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "before": { - # "address_family": [ - # { - # "afi": "ipv4", - # "neighbor": [ - # { - # "activate": true, - # "peer": "1.1.1.1" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "activate": true, - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "isis_level": "level-2", - # "protocol": "isis" - # } - # ], - # "route_target": { - # "mode": "export", - # "target": "33:11" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "changed": true, - # "commands": [ - # "router bgp 10", - # "vrf vrft", - # "address-family ipv6", - # "redistribute ospfv3 match external", - # "no redistribute isis level-2", - # "no route-target export 33:11", - # "exit", - # "exit", - # "address-family ipv6", - # "redistribute isis level-2", - # "no neighbor peer2 activate", - # "no bgp additional-paths receive", - # "exit" - # ], # Using overridden (overriding af at global context): - # Before state: + # Before state: + # ------------- # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1390,23 +1320,83 @@ Examples # vrf vrft # address-family ipv6 # redistribute ospfv3 match external - # veos(config-router-bgp)# - - - name: Overridden - arista.eos.eos_bgp_address_family: - config: - as_number: "10" - address_family: - - afi: "ipv4" - bgp_params: - additional_paths: "receive" - neighbor: - - peer: "peer2" - default_originate: - always: True - state: overridden - - # After State: + + - name: Override running config with provided config + arista.eos.eos_bgp_address_family: + config: + as_number: "10" + address_family: + - afi: "ipv4" + bgp_params: + additional_paths: "receive" + neighbor: + - peer: "peer2" + default_originate: + always: true + state: overridden + + + # + # Task output: + # ------------ + # before: + # address_family: + # - afi: ipv4 + # neighbor: + # - activate: true + # peer: 1.1.1.1 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # redistribute: + # - isis_level: level-2 + # protocol: isis + # - afi: ipv6 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # vrf: vrft + # as_number: '10' + # + # commands: + # - router bgp 10 + # - address-family ipv4 + # - no redistribute ospfv3 match external + # - no network 1.1.1.0/24 + # - no network 1.5.1.0/24 route-map MAP01 + # - neighbor peer2 default-originate always + # - no neighbor 1.1.1.1 activate + # - bgp additional-paths receive + # - exit + # - no address-family ipv6 + # + # after: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # - afi: ipv6 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # vrf: vrft + # as_number: '10' + + # After state: + # ------------ # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1420,113 +1410,11 @@ Examples # vrf vrft # address-family ipv6 # redistribute ospfv3 match external - # veos(config-router-bgp)# - # - # Module Execution: - # - # "after": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ], - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "before": { - # "address_family": [ - # { - # "afi": "ipv4", - # "neighbor": [ - # { - # "activate": true, - # "peer": "1.1.1.1" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "redistribute": [ - # { - # "isis_level": "level-2", - # "protocol": "isis" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ], - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "changed": true, - # "commands": [ - # "router bgp 10", - # "address-family ipv4", - # "no redistribute ospfv3 match external", - # "no network 1.1.1.0/24", - # "no network 1.5.1.0/24 route-map MAP01", - # "neighbor peer2 default-originate always", - # "no neighbor 1.1.1.1 activate", - # "bgp additional-paths receive", - # "exit", - # "no address-family ipv6" - # ], # using Overridden (overridding af in vrf context): - # Before State: - + # Before state: + # ------------- # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1550,26 +1438,101 @@ Examples # route-target export 33:11 # redistribute isis level-2 # redistribute ospfv3 match external - # veos(config-router-bgp)# - - - - name: Overridden - arista.eos.eos_bgp_address_family: - config: - as_number: "10" - address_family: - - afi: "ipv4" - bgp_params: - additional_paths: "receive" - neighbor: - - peer: "peer2" - default_originate: - always: True - vrf: vrft - state: overridden - - # After State: + - name: Override running config with provided config + arista.eos.eos_bgp_address_family: + config: + as_number: "10" + address_family: + - afi: "ipv4" + bgp_params: + additional_paths: "receive" + neighbor: + - peer: "peer2" + default_originate: + always: true + vrf: vrft + state: overridden + + # Task output: + # ------------ + # before: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # - afi: ipv6 + # redistribute: + # - isis_level: level-2 + # protocol: isis + # - ospf_route: external + # protocol: ospfv3 + # route_target: + # action: export + # target: '33:11' + # vrf: vrft + # as_number: '10' + # + # commands: + # - router bgp 10 + # - vrf vrft + # - address-family ipv4 + # - neighbor peer2 default-originate always + # - bgp additional-paths receive + # - exit + # - exit + # - vrf vrft + # - no address-family ipv6 + # + # after: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # vrf: vrft + # as_number: '10' + + # After state: + # ------------ # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1590,146 +1553,11 @@ Examples # vrf vrft # address-family ipv4 # bgp additional-paths receive - # veos(config-router-bgp)# - # - # Module Execution: - # - # "after": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ] - # }, - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "before": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "isis_level": "level-2", - # "protocol": "isis" - # }, - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ], - # "route_target": { - # "mode": "export", - # "target": "33:11" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "changed": true, - # "commands": [ - # "router bgp 10", - # "vrf vrft", - # "address-family ipv4", - # "neighbor peer2 default-originate always", - # "bgp additional-paths receive", - # "exit", - # "exit", - # " vrf vrft", - # "no address-family ipv6" - # ], - - # Using Deleted: + # Using deleted + + # Before state: + # ------------- # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1751,20 +1579,72 @@ Examples # vrf vrft # address-family ipv4 # bgp additional-paths receive - # veos(config-router-bgp)# - - name: Delete - arista.eos.eos_bgp_address_family: - config: - as_number: "10" - address_family: - - afi: "ipv6" - vrf: "vrft" - - afi: "ipv6" - state: deleted - - # After State: + - name: Delete running config for provided afi + arista.eos.eos_bgp_address_family: + config: + as_number: "10" + address_family: + - afi: "ipv6" + vrf: "vrft" + - afi: "ipv6" + state: deleted + + # Task output: + # ------------ + # before: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # vrf: vrft + # as_number: '10' + # + # after: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # vrf: vrft + # as_number: '10' + # After state: + # ------------ # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -1782,111 +1662,12 @@ Examples # vrf vrft # address-family ipv4 # bgp additional-paths receive - # veos(config-router-bgp)# - # - # Module Execution: - # - # "after": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - # "before": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ] - # }, - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - - # Using parsed: - - # parsed_bgp_address_family.cfg : + + # Using parsed + + # parsed.cfg + # ---------- # router bgp 10 # neighbor n2 peer group # neighbor n2 next-hop-unchanged @@ -1920,82 +1701,52 @@ Examples # address-family ipv6 # redistribute ospfv3 match external - - name: parse configs - arista.eos.eos_bgp_address_family: - running_config: "{{ lookup('file', './parsed_bgp_address_family.cfg') }}" - state: parsed - - # Module Execution: - # "parsed": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "neighbor": [ - # { - # "next_hop_unchanged": true, - # "peer": "n2" - # } - # ], - # "redistribute": [ - # { - # "isis_level": "level-2", - # "protocol": "isis" - # } - # ] - # }, - # { - # "afi": "ipv4", - # "route_target": { - # "mode": "import", - # "target": "20:11" - # }, - # "vrf": "bgp_10" - # }, - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "vrf": "vrft" - # }, - # { - # "afi": "ipv6", - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ], - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # } - # } - - # Using gathered: - - # Device config: + - name: parse running config and generate structred facts + arista.eos.eos_bgp_address_family: + running_config: "{{ lookup('file', './parsed_bgp_address_family.cfg') }}" + state: parsed + + # Task output: + # ------------ + # parsed: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv6 + # neighbor: + # - next_hop_unchanged: true + # peer: n2 + # redistribute: + # - isis_level: level-2 + # protocol: isis + # - afi: ipv4 + # route_target: + # action: import + # target: '20:11' + # vrf: bgp_10 + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # vrf: vrft + # - afi: ipv6 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # vrf: vrft + # as_number: '10' + + # Using gathered + + # running config + # -------------- # veos(config-router-bgp)#show running-config | section bgp # router bgp 10 # neighbor peer2 peer group @@ -2013,111 +1764,205 @@ Examples # vrf vrft # address-family ipv4 # bgp additional-paths receive - # veos(config-router-bgp)# - - - name: gather configs - arista.eos.eos_bgp_address_family: - state: gathered - - # Module Execution: - # "gathered": { - # "address_family": [ - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "neighbor": [ - # { - # "default_originate": { - # "always": true - # }, - # "peer": "peer2" - # } - # ], - # "network": [ - # { - # "address": "1.1.1.0/24" - # }, - # { - # "address": "1.5.1.0/24", - # "route_map": "MAP01" - # } - # ], - # "redistribute": [ - # { - # "ospf_route": "external", - # "protocol": "ospfv3" - # } - # ] - # }, - # { - # "afi": "ipv4", - # "bgp_params": { - # "additional_paths": "receive" - # }, - # "vrf": "vrft" - # } - # ], - # "as_number": "10" - # }, - - # using rendered: - - - name: Render - arista.eos.eos_bgp_address_family: - config: - as_number: "10" - address_family: - - afi: "ipv4" - redistribute: - - protocol: "ospfv3" - ospf_route: "external" - network: - - address: "1.1.1.0/24" - - address: "1.5.1.0/24" - route_map: "MAP01" - - afi: "ipv6" - bgp_params: - additional_paths: "receive" - neighbor: - - peer: "peer2" - default_originate: - always: True - - afi: "ipv6" - redistribute: - - protocol: "isis" - isis_level: "level-2" - route_target: - mode: "export" - target: "33:11" - vrf: "vrft" - - state: rendered - - # Module Execution: - - # "rendered": [ - # "router bgp 10", - # "address-family ipv4", - # "redistribute ospfv3 match external", - # "network 1.1.1.0/24", - # "network 1.5.1.0/24 route-map MAP01", - # "exit", - # "address-family ipv6", - # "neighbor peer2 default-originate always", - # "bgp additional-paths receive", - # "exit", - # "vrf vrft", - # "address-family ipv6", - # "redistribute isis level-2", - # "route-target export 33:11", - # "exit", - # "exit" - # ] - # + - name: gather running config + arista.eos.eos_bgp_address_family: + state: gathered + + # Task output: + # ------------ + # gathered: + # address_family: + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # neighbor: + # - default_originate: + # always: true + # peer: peer2 + # network: + # - address: 1.1.1.0/24 + # - address: 1.5.1.0/24 + # route_map: MAP01 + # redistribute: + # - ospf_route: external + # protocol: ospfv3 + # - afi: ipv4 + # bgp_params: + # additional_paths: receive + # vrf: vrft + # as_number: '10' + + # using rendered + + - name: Render CLI commands for provided config + arista.eos.eos_bgp_address_family: + config: + as_number: "10" + address_family: + - afi: "ipv4" + redistribute: + - protocol: "ospfv3" + ospf_route: "external" + network: + - address: "1.1.1.0/24" + - address: "1.5.1.0/24" + route_map: "MAP01" + - afi: "ipv6" + bgp_params: + additional_paths: "receive" + neighbor: + - peer: "peer2" + default_originate: + always: true + - afi: "ipv6" + redistribute: + - protocol: "isis" + isis_level: "level-2" + route_target: + mode: "export" + target: "33:11" + vrf: "vrft" + state: rendered + + # Task output: + # ------------ + # rendered: + # - router bgp 10 + # - address-family ipv4 + # - redistribute ospfv3 match external + # - network 1.1.1.0/24 + # - network 1.5.1.0/24 route-map MAP01 + # - exit + # - address-family ipv6 + # - neighbor peer2 default-originate always + # - bgp additional-paths receive + # - exit + # - vrf vrft + # - address-family ipv6 + # - redistribute isis level-2 + # - route-target export 33:11 + # - exit + # - exit + + + +Return Values +------------- +Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: + +.. raw:: html + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Key</th> + <th>Returned</th> + <th width="100%">Description</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>after</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when changed</td> + <td> + <div>The resulting configuration after module execution.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>before</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> + <td> + <div>The configuration prior to the module execution.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>commands</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> + <td> + <div>The set of commands pushed to the remote device.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router bgp 10', 'address-family ipv4', 'redistribute ospfv3 match external', 'network 1.1.1.0/24']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router bgp 10', 'address-family ipv4', 'redistribute ospfv3 match external', 'network 1.1.1.0/24']</div> + </td> + </tr> + </table> + <br/><br/> Status diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_global_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_global_module.rst index e04df2071..65fcd7ca5 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_global_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_global_module.rst @@ -382,7 +382,7 @@ Parameters </ul> </td> <td> - <div>When True, it is set.</div> + <div>When true, it is set.</div> </td> </tr> @@ -1251,7 +1251,7 @@ Parameters </ul> </td> <td> - <div>When True route_reflector is set.</div> + <div>When true route_reflector is set.</div> </td> </tr> @@ -1408,7 +1408,7 @@ Parameters </ul> </td> <td> - <div>When True, graceful restart is set.</div> + <div>When true, graceful restart is set.</div> </td> </tr> <tr> @@ -1686,7 +1686,7 @@ Parameters </ul> </td> <td> - <div>When True, it is set.</div> + <div>When true, it is set.</div> </td> </tr> @@ -1864,7 +1864,7 @@ Parameters </ul> </td> <td> - <div>If True, ttl is not set.</div> + <div>If true, ttl is not set.</div> </td> </tr> <tr> @@ -2155,7 +2155,7 @@ Parameters </ul> </td> <td> - <div>If True, set link bandwidth</div> + <div>If true, set link bandwidth</div> </td> </tr> <tr> @@ -2725,7 +2725,7 @@ Parameters </ul> </td> <td> - <div>If True, set remove_private_as.</div> + <div>If true, set remove_private_as.</div> </td> </tr> @@ -3422,7 +3422,7 @@ Parameters </ul> </td> <td> - <div>When True, shut down BGP.</div> + <div>When true, shut down BGP.</div> </td> </tr> <tr> @@ -3658,7 +3658,7 @@ Parameters </ul> </td> <td> - <div>If True, ucmp mode is set to 1.</div> + <div>If true, ucmp mode is set to 1.</div> </td> </tr> @@ -4102,7 +4102,7 @@ Parameters </ul> </td> <td> - <div>When True, it is set.</div> + <div>When true, it is set.</div> </td> </tr> @@ -5014,7 +5014,7 @@ Parameters </ul> </td> <td> - <div>When True route_reflector is set.</div> + <div>When true route_reflector is set.</div> </td> </tr> @@ -5180,7 +5180,7 @@ Parameters </ul> </td> <td> - <div>When True, graceful restart is set.</div> + <div>When true, graceful restart is set.</div> </td> </tr> <tr> @@ -5375,7 +5375,7 @@ Parameters </ul> </td> <td> - <div>When True, it is set.</div> + <div>When true, it is set.</div> </td> </tr> @@ -5562,7 +5562,7 @@ Parameters </ul> </td> <td> - <div>If True, ttl is not set.</div> + <div>If true, ttl is not set.</div> </td> </tr> <tr> @@ -5868,7 +5868,7 @@ Parameters </ul> </td> <td> - <div>If True, set link bandwidth</div> + <div>If true, set link bandwidth</div> </td> </tr> <tr> @@ -6468,7 +6468,7 @@ Parameters </ul> </td> <td> - <div>If True, set remove_private_as.</div> + <div>If true, set remove_private_as.</div> </td> </tr> @@ -7241,7 +7241,7 @@ Parameters </ul> </td> <td> - <div>When True, shut down BGP.</div> + <div>When true, shut down BGP.</div> </td> </tr> <tr> @@ -7491,7 +7491,7 @@ Parameters </ul> </td> <td> - <div>If True, ucmp mode is set to 1.</div> + <div>If true, ucmp mode is set to 1.</div> </td> </tr> @@ -7603,6 +7603,7 @@ Parameters <ul style="margin: 0; padding: 0"><b>Choices:</b> <li>deleted</li> <li><div style="color: blue"><b>merged</b> ←</div></li> + <li>overridden</li> <li>purged</li> <li>replaced</li> <li>gathered</li> @@ -7636,68 +7637,152 @@ Examples .. code-block:: yaml - # Using merged - # Before state + # Using Merged + # Before state: + # ------------- # veos(config)#show running-config | section bgp # veos(config)# - - name: Merge provided configuration with device configuration - arista.eos.eos_bgp_global: - config: - as_number: "100" - bgp_params: - host_routes: True - convergence: - slow_peer: True - time: 6 - additional_paths: "send" - log_neighbor_changes: True - maximum_paths: - max_equal_cost_paths: 55 - aggregate_address: - - address: "1.2.1.0/24" - as_set: true - match_map: "match01" - - address: "5.2.1.0/24" - attribute_map: "attrmatch01" - advertise_only: true - redistribute: - - protocol: "static" - route_map: "map_static" - - protocol: "attached-host" - distance: - internal: 50 - neighbor: - - peer: "10.1.3.2" - allowas_in: - set: true - default_originate: - always: true - dont_capability_negotiate: true - export_localpref: 4000 - maximum_received_routes: - count: 500 - warning_limit: - limit_percent: 5 - next_hop_unchanged: true - prefix_list: - name: "prefix01" - direction: "out" - - neighbor_address: "peer1" - fall_over: true - link_bandwidth: - update_delay: 5 - monitoring: True - send_community: - community_attribute: "extended" - sub_attribute: "link-bandwidth" - link_bandwidth_attribute: "aggregate" - speed: "600" - vlan: 5 - state: merged - - # After State: + - name: Merge provided configuration with device configuration + arista.eos.eos_bgp_global: + config: + as_number: "100" + bgp_params: + host_routes: true + convergence: + slow_peer: true + time: 6 + additional_paths: "send" + log_neighbor_changes: true + maximum_paths: + max_equal_cost_paths: 55 + aggregate_address: + - address: "1.2.1.0/24" + as_set: true + match_map: "match01" + - address: "5.2.1.0/24" + attribute_map: "attrmatch01" + advertise_only: true + redistribute: + - protocol: "static" + route_map: "map_static" + - protocol: "attached-host" + distance: + internal: 50 + neighbor: + - peer: "10.1.3.2" + allowas_in: + set: true + default_originate: + always: true + dont_capability_negotiate: true + export_localpref: 4000 + maximum_received_routes: + count: 500 + warning_limit: + limit_percent: 5 + next_hop_unchanged: true + prefix_list: + name: "prefix01" + direction: "out" + - neighbor_address: "peer1" + fall_over: true + link_bandwidth: + update_delay: 5 + monitoring: true + send_community: + community_attribute: "extended" + sub_attribute: "link-bandwidth" + link_bandwidth_attribute: "aggregate" + speed: "600" + vlan: 5 + state: merged + + # Task output: + # ------------ + # before: {} + # + # commands: + # - router bgp 100 + # - neighbor 10.1.3.2 allowas-in + # - neighbor 10.1.3.2 default-originate always + # - neighbor 10.1.3.2 dont-capability-negotiate + # - neighbor 10.1.3.2 export-localpref 4000 + # - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # - neighbor 10.1.3.2 next-hop-unchanged + # - neighbor 10.1.3.2 prefix-list prefix01 out + # - neighbor peer1 fall-over bfd + # - neighbor peer1 link-bandwidth update-delay 5 + # - neighbor peer1 monitoring + # - neighbor peer1 send-community extended link-bandwidth aggregate 600 + # - redistribute static route-map map_static + # - redistribute attached-host + # - aggregate-address 1.2.1.0/24 as-set match-map match01 + # - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # - bgp host-routes fib direct-install + # - bgp convergence slow-peer time 6 + # - bgp additional-paths send any + # - bgp log-neighbor-changes + # - maximum-paths 55 + # - distance bgp 50 + # - vlan 5 + # + # after: + # aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - fall_over: true + # link_bandwidth: + # set: true + # update_delay: 5 + # maximum_received_routes: + # count: 12000 + # monitoring: true + # neighbor_address: peer1 + # peer_group: peer1 + # send_community: + # community_attribute: extended + # link_bandwidth_attribute: aggregate + # speed: '600' + # sub_attribute: link-bandwidth + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vlan: 5 + + # After state: + # ------------ # veos(config)#show running-config | section bgp # router bgp 100 # bgp convergence slow-peer time 6 @@ -7725,120 +7810,11 @@ Examples # ! # address-family ipv4 # neighbor 10.1.3.2 prefix-list prefix01 out - # veos(config)# - # - # Module Execution: - # - # "after": { - # "aggregate_address": [ - # { - # "address": "1.2.1.0/24", - # "as_set": true, - # "match_map": "match01" - # }, - # { - # "address": "5.2.1.0/24", - # "advertise_only": true, - # "attribute_map": "attrmatch01" - # } - # ], - # "as_number": "100", - # "bgp_params": { - # "additional_paths": "send", - # "convergence": { - # "slow_peer": true, - # "time": 6 - # } - # }, - # "distance": { - # "external": 50, - # "internal": 50, - # "local": 50 - # }, - # "maximum_paths": { - # "max_equal_cost_paths": 55 - # }, - # "neighbor": [ - # { - # "fall_over": true, - # "link_bandwidth": { - # "set": true, - # "update_delay": 5 - # }, - # "maximum_received_routes": { - # "count": 12000 - # }, - # "monitoring": true, - # "peer": "peer1", - # "peer_group": "peer1", - # "send_community": { - # "community_attribute": "extended", - # "link_bandwidth_attribute": "aggregate", - # "speed": "600", - # "sub_attribute": "link-bandwidth" - # } - # }, - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "export_localpref": 4000, - # "maximum_received_routes": { - # "count": 500, - # "warning_limit": { - # "limit_percent": 5 - # } - # }, - # "next_hop_unchanged": true, - # "peer": "10.1.3.2" - # } - # ], - # "redistribute": [ - # { - # "protocol": "static", - # "route_map": "map_static" - # }, - # { - # "protocol": "attached-host" - # } - # ], - # "vlan": 5 - # }, - # "before": {}, - # "changed": true, - # "commands": [ - # "router bgp 100", - # "neighbor 10.1.3.2 allowas-in", - # "neighbor 10.1.3.2 default-originate always", - # "neighbor 10.1.3.2 dont-capability-negotiate", - # "neighbor 10.1.3.2 export-localpref 4000", - # "neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent", - # "neighbor 10.1.3.2 next-hop-unchanged", - # "neighbor 10.1.3.2 prefix-list prefix01 out", - # "neighbor peer1 fall-over bfd", - # "neighbor peer1 link-bandwidth update-delay 5", - # "neighbor peer1 monitoring", - # "neighbor peer1 send-community extended link-bandwidth aggregate 600", - # "redistribute static route-map map_static", - # "redistribute attached-host", - # "aggregate-address 1.2.1.0/24 as-set match-map match01", - # "aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only", - # "bgp host-routes fib direct-install", - # "bgp convergence slow-peer time 6", - # "bgp additional-paths send any", - # "bgp log-neighbor-changes", - # "maximum-paths 55", - # "distance bgp 50", - # "vlan 5" - # ], # Using replaced: # Before state: + # ------------- # veos(config)#show running-config | section bgp # router bgp 100 # bgp convergence slow-peer time 6 @@ -7873,66 +7849,215 @@ Examples # neighbor 12.1.3.2 allowas-in 3 # neighbor 12.1.3.2 default-originate always # neighbor 12.1.3.2 maximum-routes 12000 - # veos(config)# - - - name: replace provided configuration with device configuration - arista.eos.eos_bgp_global: - config: - as_number: "100" - bgp_params: - host_routes: True - convergence: - slow_peer: True - time: 6 - additional_paths: "send" - log_neighbor_changes: True - vrfs: - - vrf: "vrf01" - maximum_paths: - max_equal_cost_paths: 55 - aggregate_address: - - address: "1.2.1.0/24" - as_set: true - match_map: "match01" - - address: "5.2.1.0/24" - attribute_map: "attrmatch01" - advertise_only: true - redistribute: - - protocol: "static" - route_map: "map_static" - - protocol: "attached-host" - distance: - internal: 50 - neighbor: - - neighbor_address: "10.1.3.2" - allowas_in: - set: true - default_originate: - always: true - dont_capability_negotiate: true - export_localpref: 4000 - maximum_received_routes: - count: 500 - warning_limit: - limit_percent: 5 - next_hop_unchanged: true - prefix_list: - name: "prefix01" - direction: "out" - - neighbor_address: "peer1" - fall_over: true - link_bandwidth: - update_delay: 5 - monitoring: True - send_community: - community_attribute: "extended" - sub_attribute: "link-bandwidth" - link_bandwidth_attribute: "aggregate" - speed: "600" - state: replaced - - # After State: + - name: replace provided configuration with device configuration + arista.eos.eos_bgp_global: + config: + as_number: "100" + bgp_params: + host_routes: true + convergence: + slow_peer: true + time: 6 + additional_paths: "send" + log_neighbor_changes: true + vrfs: + - vrf: "vrf01" + maximum_paths: + max_equal_cost_paths: 55 + aggregate_address: + - address: "1.2.1.0/24" + as_set: true + match_map: "match01" + - address: "5.2.1.0/24" + attribute_map: "attrmatch01" + advertise_only: true + redistribute: + - protocol: "static" + route_map: "map_static" + - protocol: "attached-host" + distance: + internal: 50 + neighbor: + - neighbor_address: "10.1.3.2" + allowas_in: + set: true + default_originate: + always: true + dont_capability_negotiate: true + export_localpref: 4000 + maximum_received_routes: + count: 500 + warning_limit: + limit_percent: 5 + next_hop_unchanged: true + prefix_list: + name: "prefix01" + direction: "out" + - neighbor_address: "peer1" + fall_over: true + link_bandwidth: + update_delay: 5 + monitoring: true + send_community: + community_attribute: "extended" + sub_attribute: "link-bandwidth" + link_bandwidth_attribute: "aggregate" + speed: "600" + state: replaced + + # Task output: + # ------------ + + # before: + # aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - fall_over: true + # link_bandwidth: + # set: true + # update_delay: 5 + # maximum_received_routes: + # count: 12000 + # monitoring: true + # neighbor_address: peer1 + # peer_group: peer1 + # send_community: + # community_attribute: extended + # link_bandwidth_attribute: aggregate + # speed: '600' + # sub_attribute: link-bandwidth + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vlan: 5 + # vrfs: + # - neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # maximum_received_routes: + # count: 12000 + # neighbor_address: 12.1.3.2 + # route_target: + # action: import + # target: '54:11' + # vrf: vrf01 + # + # commands: + # - router bgp 100 + # - vrf vrf01 + # - no route-target import 54:11 + # - neighbor 10.1.3.2 allowas-in + # - neighbor 10.1.3.2 default-originate always + # - neighbor 10.1.3.2 dont-capability-negotiate + # - neighbor 10.1.3.2 export-localpref 4000 + # - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # - neighbor 10.1.3.2 next-hop-unchanged + # - neighbor 10.1.3.2 prefix-list prefix01 out + # - neighbor peer1 fall-over bfd + # - neighbor peer1 link-bandwidth update-delay 5 + # - neighbor peer1 monitoring + # - neighbor peer1 send-community extended link-bandwidth aggregate 600 + # - no neighbor 12.1.3.2 + # - redistribute static route-map map_static + # - redistribute attached-host + # - aggregate-address 1.2.1.0/24 as-set match-map match01 + # - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # - maximum-paths 55 + # - distance bgp 50 + # - exit + # - no neighbor peer1 peer group + # - no neighbor peer1 link-bandwidth update-delay 5 + # - no neighbor peer1 fall-over bfd + # - no neighbor peer1 monitoring + # - no neighbor peer1 send-community extended link-bandwidth aggregate 600 + # - no neighbor peer1 maximum-routes 12000 + # - no neighbor 10.1.3.2 + # - no redistribute static route-map map_static + # - no redistribute attached-host + # - no aggregate-address 1.2.1.0/24 as-set match-map match01 + # - no aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # - bgp host-routes fib direct-install + # - bgp log-neighbor-changes + # - no distance bgp 50 50 50 + # - no maximum-paths 55 + # - no vlan 5 + # + # after: + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # vrfs: + # - aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vrf: vrf01 + # + # After state: + # ------------ # veos(config)#show running-config | section bgp # router bgp 100 # bgp convergence slow-peer time 6 @@ -7954,225 +8079,255 @@ Examples # ! # address-family ipv4 # neighbor 10.1.3.2 prefix-list prefix01 out - # veos(config)# - # + + # Using overridden: + # (Note: Overridden and replaced operations are identitical) + + # Before state: + # ------------- + # veos(config)#show running-config | section bgp + # router bgp 100 + # bgp convergence slow-peer time 6 + # distance bgp 50 50 50 + # maximum-paths 55 + # bgp additional-paths send any + # neighbor peer1 peer group + # neighbor peer1 link-bandwidth update-delay 5 + # neighbor peer1 fall-over bfd + # neighbor peer1 monitoring + # neighbor peer1 send-community extended link-bandwidth aggregate 600 + # neighbor peer1 maximum-routes 12000 + # neighbor 10.1.3.2 export-localpref 4000 + # neighbor 10.1.3.2 next-hop-unchanged + # neighbor 10.1.3.2 dont-capability-negotiate + # neighbor 10.1.3.2 allowas-in 3 + # neighbor 10.1.3.2 default-originate always + # neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # aggregate-address 1.2.1.0/24 as-set match-map match01 + # aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # redistribute static route-map map_static + # redistribute attached-host + # ! + # vlan 5 + # ! + # address-family ipv4 + # neighbor 10.1.3.2 prefix-list prefix01 out + # ! + # vrf vrf01 + # route-target import 54:11 + # neighbor 12.1.3.2 dont-capability-negotiate + # neighbor 12.1.3.2 allowas-in 3 + # neighbor 12.1.3.2 default-originate always + # neighbor 12.1.3.2 maximum-routes 12000 + + - name: override running configuration with configuration + arista.eos.eos_bgp_global: + config: + as_number: "100" + bgp_params: + host_routes: true + convergence: + slow_peer: true + time: 6 + additional_paths: "send" + log_neighbor_changes: true + vrfs: + - vrf: "vrf01" + maximum_paths: + max_equal_cost_paths: 55 + aggregate_address: + - address: "1.2.1.0/24" + as_set: true + match_map: "match01" + - address: "5.2.1.0/24" + attribute_map: "attrmatch01" + advertise_only: true + redistribute: + - protocol: "static" + route_map: "map_static" + - protocol: "attached-host" + distance: + internal: 50 + neighbor: + - neighbor_address: "10.1.3.2" + allowas_in: + set: true + default_originate: + always: true + dont_capability_negotiate: true + export_localpref: 4000 + maximum_received_routes: + count: 500 + warning_limit: + limit_percent: 5 + next_hop_unchanged: true + prefix_list: + name: "prefix01" + direction: "out" + - neighbor_address: "peer1" + fall_over: true + link_bandwidth: + update_delay: 5 + monitoring: true + send_community: + community_attribute: "extended" + sub_attribute: "link-bandwidth" + link_bandwidth_attribute: "aggregate" + speed: "600" + state: overridden + + # Task output: + # ------------ + # before: + # aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - fall_over: true + # link_bandwidth: + # set: true + # update_delay: 5 + # maximum_received_routes: + # count: 12000 + # monitoring: true + # neighbor_address: peer1 + # peer_group: peer1 + # send_community: + # community_attribute: extended + # link_bandwidth_attribute: aggregate + # speed: '600' + # sub_attribute: link-bandwidth + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vlan: 5 + # vrfs: + # - neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # maximum_received_routes: + # count: 12000 + # neighbor_address: 12.1.3.2 + # route_target: + # action: import + # target: '54:11' + # vrf: vrf01 # - # Module Execution: + # commands: + # - router bgp 100 + # - vrf vrf01 + # - no route-target import 54:11 + # - neighbor 10.1.3.2 allowas-in + # - neighbor 10.1.3.2 default-originate always + # - neighbor 10.1.3.2 dont-capability-negotiate + # - neighbor 10.1.3.2 export-localpref 4000 + # - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # - neighbor 10.1.3.2 next-hop-unchanged + # - neighbor 10.1.3.2 prefix-list prefix01 out + # - neighbor peer1 fall-over bfd + # - neighbor peer1 link-bandwidth update-delay 5 + # - neighbor peer1 monitoring + # - neighbor peer1 send-community extended link-bandwidth aggregate 600 + # - no neighbor 12.1.3.2 + # - redistribute static route-map map_static + # - redistribute attached-host + # - aggregate-address 1.2.1.0/24 as-set match-map match01 + # - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # - maximum-paths 55 + # - distance bgp 50 + # - exit + # - no neighbor peer1 peer group + # - no neighbor peer1 link-bandwidth update-delay 5 + # - no neighbor peer1 fall-over bfd + # - no neighbor peer1 monitoring + # - no neighbor peer1 send-community extended link-bandwidth aggregate 600 + # - no neighbor peer1 maximum-routes 12000 + # - no neighbor 10.1.3.2 + # - no redistribute static route-map map_static + # - no redistribute attached-host + # - no aggregate-address 1.2.1.0/24 as-set match-map match01 + # - no aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # - bgp host-routes fib direct-install + # - bgp log-neighbor-changes + # - no distance bgp 50 50 50 + # - no maximum-paths 55 + # - no vlan 5 # - # "after": { - # "as_number": "100", - # "bgp_params": { - # "additional_paths": "send", - # "convergence": { - # "slow_peer": true, - # "time": 6 - # } - # }, - # "vrfs": [ - # { - # "aggregate_address": [ - # { - # "address": "1.2.1.0/24", - # "as_set": true, - # "match_map": "match01" - # }, - # { - # "address": "5.2.1.0/24", - # "advertise_only": true, - # "attribute_map": "attrmatch01" - # } - # ], - # "distance": { - # "external": 50, - # "internal": 50, - # "local": 50 - # }, - # "maximum_paths": { - # "max_equal_cost_paths": 55 - # }, - # "neighbor": [ - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "export_localpref": 4000, - # "maximum_received_routes": { - # "count": 500, - # "warning_limit": { - # "limit_percent": 5 - # } - # }, - # "next_hop_unchanged": true, - # "peer": "10.1.3.2" - # } - # ], - # "redistribute": [ - # { - # "protocol": "static", - # "route_map": "map_static" - # }, - # { - # "protocol": "attached-host" - # } - # ], - # "vrf": "vrf01" - # } - # ] - # }, - # "before": { - # "aggregate_address": [ - # { - # "address": "1.2.1.0/24", - # "as_set": true, - # "match_map": "match01" - # }, - # { - # "address": "5.2.1.0/24", - # "advertise_only": true, - # "attribute_map": "attrmatch01" - # } - # ], - # "as_number": "100", - # "bgp_params": { - # "additional_paths": "send", - # "convergence": { - # "slow_peer": true, - # "time": 6 - # } - # }, - # "distance": { - # "external": 50, - # "internal": 50, - # "local": 50 - # }, - # "maximum_paths": { - # "max_equal_cost_paths": 55 - # }, - # "neighbor": [ - # { - # "fall_over": true, - # "link_bandwidth": { - # "set": true, - # "update_delay": 5 - # }, - # "maximum_received_routes": { - # "count": 12000 - # }, - # "monitoring": true, - # "peer": "peer1", - # "peer_group": "peer1", - # "send_community": { - # "community_attribute": "extended", - # "link_bandwidth_attribute": "aggregate", - # "speed": "600", - # "sub_attribute": "link-bandwidth" - # } - # }, - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "export_localpref": 4000, - # "maximum_received_routes": { - # "count": 500, - # "warning_limit": { - # "limit_percent": 5 - # } - # }, - # "next_hop_unchanged": true, - # "peer": "10.1.3.2" - # } - # ], - # "redistribute": [ - # { - # "protocol": "static", - # "route_map": "map_static" - # }, - # { - # "protocol": "attached-host" - # } - # ], - # "vlan": 5, - # "vrfs": [ - # { - # "neighbor": [ - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "maximum_received_routes": { - # "count": 12000 - # }, - # "peer": "12.1.3.2" - # } - # ], - # "route_target": { - # "action": "import", - # "target": "54:11" - # }, - # "vrf": "vrf01" - # } - # ] - # }, - # "changed": true, - # "commands": [ - # "router bgp 100", - # "vrf vrf01", - # "no route-target import 54:11", - # "neighbor 10.1.3.2 allowas-in", - # "neighbor 10.1.3.2 default-originate always", - # "neighbor 10.1.3.2 dont-capability-negotiate", - # "neighbor 10.1.3.2 export-localpref 4000", - # "neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent", - # "neighbor 10.1.3.2 next-hop-unchanged", - # "neighbor 10.1.3.2 prefix-list prefix01 out", - # "neighbor peer1 fall-over bfd", - # "neighbor peer1 link-bandwidth update-delay 5", - # "neighbor peer1 monitoring", - # "neighbor peer1 send-community extended link-bandwidth aggregate 600", - # "no neighbor 12.1.3.2", - # "redistribute static route-map map_static", - # "redistribute attached-host", - # "aggregate-address 1.2.1.0/24 as-set match-map match01", - # "aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only", - # "maximum-paths 55", - # "distance bgp 50", - # "exit", - # "no neighbor peer1 peer group", - # "no neighbor peer1 link-bandwidth update-delay 5", - # "no neighbor peer1 fall-over bfd", - # "no neighbor peer1 monitoring", - # "no neighbor peer1 send-community extended link-bandwidth aggregate 600", - # "no neighbor peer1 maximum-routes 12000", - # "no neighbor 10.1.3.2", - # "no redistribute static route-map map_static", - # "no redistribute attached-host", - # "no aggregate-address 1.2.1.0/24 as-set match-map match01", - # "no aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only", - # "bgp host-routes fib direct-install", - # "bgp log-neighbor-changes", - # "no distance bgp 50 50 50", - # "no maximum-paths 55", - # "no vlan 5" - # ], + # after: + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # vrfs: + # - aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vrf: vrf01 # - - # Using replaced (in presence of address_family under vrf): - # Before State: - - #veos(config)#show running-config | section bgp + # After state: + # ------------ + # veos(config)#show running-config | section bgp # router bgp 100 # bgp convergence slow-peer time 6 # bgp additional-paths send any @@ -8193,82 +8348,11 @@ Examples # ! # address-family ipv4 # neighbor 10.1.3.2 prefix-list prefix01 out - # ! - # address-family ipv6 - # redistribute dhcp - # veos(config)# - - - name: Replace - arista.eos.eos_bgp_global: - config: - as_number: "100" - graceful_restart: - set: True - router_id: "1.1.1.1" - timers: - keepalive: 2 - holdtime: 5 - ucmp: - mode: - set: True - vlan_aware_bundle: "bundle1 bundle2 bundle3" - state: replaced - - # Module Execution: - - # fatal: [192.168.122.113]: FAILED! => { - # "changed": false, - # "invocation": { - # "module_args": { - # "config": { - # "access_group": null, - # "aggregate_address": null, - # "as_number": "100", - # "bgp_params": null, - # "default_metric": null, - # "distance": null, - # "graceful_restart": { - # "restart_time": null, - # "set": true, - # "stalepath_time": null - # }, - # "graceful_restart_helper": null, - # "maximum_paths": null, - # "monitoring": null, - # "neighbor": null, - # "network": null, - # "redistribute": null, - # "route_target": null, - # "router_id": "1.1.1.1", - # "shutdown": null, - # "timers": { - # "holdtime": 5, - # "keepalive": 2 - # }, - # "ucmp": { - # "fec": null, - # "link_bandwidth": null, - # "mode": { - # "nexthops": null, - # "set": true - # } - # }, - # "update": null, - # "vlan": null, - # "vlan_aware_bundle": "bundle1 bundle2 bundle3", - # "vrfs": null - # }, - # "running_config": null, - # "state": "replaced" - # } - # }, - # "msg": "Use the _bgp_af module to delete the address_family under vrf, before replacing/deleting the vrf." - # } # Using deleted: # Before state: - + # ------------- # veos(config)#show running-config | section bgp # router bgp 100 # bgp convergence slow-peer time 6 @@ -8289,100 +8373,73 @@ Examples # redistribute attached-host # ! - - name: Delete configuration - arista.eos.eos_bgp_global: - config: - as_number: "100" - state: deleted - - # After State: - - # veos(config)#show running-config | section bgp - # router bgp 100 - # + - name: Delete configuration + arista.eos.eos_bgp_global: + config: + as_number: "100" + state: deleted + + # Task output: + # ------------ + # before: + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # vrfs: + # - aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vrf: vrf01 # - # Module Execution: + # commands: + # - router bgp 100 + # - no vrf vrf01 + # - no bgp convergence slow-peer time 6 + # - no bgp additional-paths send any # - # "after": { - # "as_number": "100" - # }, - # "before": { - # "as_number": "100", - # "bgp_params": { - # "additional_paths": "send", - # "convergence": { - # "slow_peer": true, - # "time": 6 - # } - # }, - # "vrfs": [ - # { - # "aggregate_address": [ - # { - # "address": "1.2.1.0/24", - # "as_set": true, - # "match_map": "match01" - # }, - # { - # "address": "5.2.1.0/24", - # "advertise_only": true, - # "attribute_map": "attrmatch01" - # } - # ], - # "distance": { - # "external": 50, - # "internal": 50, - # "local": 50 - # }, - # "maximum_paths": { - # "max_equal_cost_paths": 55 - # }, - # "neighbor": [ - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "export_localpref": 4000, - # "maximum_received_routes": { - # "count": 500, - # "warning_limit": { - # "limit_percent": 5 - # } - # }, - # "next_hop_unchanged": true, - # "peer": "10.1.3.2" - # } - # ], - # "redistribute": [ - # { - # "protocol": "static", - # "route_map": "map_static" - # }, - # { - # "protocol": "attached-host" - # } - # ], - # "vrf": "vrf01" - # } - # ] - # }, - # "changed": true, - # "commands": [ - # "router bgp 100", - # "no vrf vrf01", - # "no bgp convergence slow-peer time 6", - # "no bgp additional-paths send any" - # ], + # after: + # as_number: '100' + # + # After state: + # ------------ + # veos(config)#show running-config | section bgp + # router bgp 100 # Using purged: # Before state: - + # ------------- # veos(config)#show running-config | section bgp # router bgp 100 # bgp convergence slow-peer time 6 @@ -8417,131 +8474,523 @@ Examples # neighbor 12.1.3.2 allowas-in 3 # neighbor 12.1.3.2 default-originate always # neighbor 12.1.3.2 maximum-routes 12000 - # veos(config)# - - - name: Purge configuration - arista.eos.eos_bgp_global: - config: - as_number: "100" - state: purged - # After State: + - name: Purge configuration + arista.eos.eos_bgp_global: + config: + as_number: "100" + state: purged + + + # Task output: + # ------------ + # before: + # aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - fall_over: true + # link_bandwidth: + # set: true + # update_delay: 5 + # maximum_received_routes: + # count: 12000 + # monitoring: true + # neighbor_address: peer1 + # peer_group: peer1 + # send_community: + # community_attribute: extended + # link_bandwidth_attribute: aggregate + # speed: '600' + # sub_attribute: link-bandwidth + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vlan: 5 + # vrfs: + # - neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # maximum_received_routes: + # count: 12000 + # neighbor_address: 12.1.3.2 + # route_target: + # action: import + # target: '54:11' + # vrf: vrf01 + # "changed": true, + # + # commands: + # - no router bgp 100 + # + # after: {} + # After state: + # ------------ # veos(config)#show running-config | section bgp # veos(config)# - # Module Execution: - - # "after": {}, - # "before": { - # "aggregate_address": [ - # { - # "address": "1.2.1.0/24", - # "as_set": true, - # "match_map": "match01" - # }, - # { - # "address": "5.2.1.0/24", - # "advertise_only": true, - # "attribute_map": "attrmatch01" - # } - # ], - # "as_number": "100", - # "bgp_params": { - # "additional_paths": "send", - # "convergence": { - # "slow_peer": true, - # "time": 6 - # } - # }, - # "distance": { - # "external": 50, - # "internal": 50, - # "local": 50 - # }, - # "maximum_paths": { - # "max_equal_cost_paths": 55 - # }, - # "neighbor": [ - # { - # "fall_over": true, - # "link_bandwidth": { - # "set": true, - # "update_delay": 5 - # }, - # "maximum_received_routes": { - # "count": 12000 - # }, - # "monitoring": true, - # "peer": "peer1", - # "peer_group": "peer1", - # "send_community": { - # "community_attribute": "extended", - # "link_bandwidth_attribute": "aggregate", - # "speed": "600", - # "sub_attribute": "link-bandwidth" - # } - # }, - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "export_localpref": 4000, - # "maximum_received_routes": { - # "count": 500, - # "warning_limit": { - # "limit_percent": 5 - # } - # }, - # "next_hop_unchanged": true, - # "peer": "10.1.3.2" - # } - # ], - # "redistribute": [ - # { - # "protocol": "static", - # "route_map": "map_static" - # }, - # { - # "protocol": "attached-host" - # } - # ], - # "vlan": 5, - # "vrfs": [ - # { - # "neighbor": [ - # { - # "allowas_in": { - # "count": 3 - # }, - # "default_originate": { - # "always": true - # }, - # "dont_capability_negotiate": true, - # "maximum_received_routes": { - # "count": 12000 - # }, - # "peer": "12.1.3.2" - # } - # ], - # "route_target": { - # "action": "import", - # "target": "54:11" - # }, - # "vrf": "vrf01" - # } - # ] - # }, - # "changed": true, - # "commands": [ - # "no router bgp 100" - # ], + # Using rendered + + - name: Render command lines for provided configuration + arista.eos.eos_bgp_global: + config: + as_number: "100" + bgp_params: + host_routes: true + convergence: + slow_peer: true + time: 6 + additional_paths: "send" + log_neighbor_changes: true + maximum_paths: + max_equal_cost_paths: 55 + aggregate_address: + - address: "1.2.1.0/24" + as_set: true + match_map: "match01" + - address: "5.2.1.0/24" + attribute_map: "attrmatch01" + advertise_only: true + redistribute: + - protocol: "static" + route_map: "map_static" + - protocol: "attached-host" + distance: + internal: 50 + neighbor: + - peer: "10.1.3.2" + allowas_in: + set: true + default_originate: + always: true + dont_capability_negotiate: true + export_localpref: 4000 + maximum_received_routes: + count: 500 + warning_limit: + limit_percent: 5 + next_hop_unchanged: true + prefix_list: + name: "prefix01" + direction: "out" + - neighbor_address: "peer1" + fall_over: true + link_bandwidth: + update_delay: 5 + monitoring: true + send_community: + community_attribute: "extended" + sub_attribute: "link-bandwidth" + link_bandwidth_attribute: "aggregate" + speed: "600" + vlan: 5 + state: rendered + + # Task output: + # ------------ + # rendered: + # - router bgp 100 + # - neighbor 10.1.3.2 allowas-in + # - neighbor 10.1.3.2 default-originate always + # - neighbor 10.1.3.2 dont-capability-negotiate + # - neighbor 10.1.3.2 export-localpref 4000 + # - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # - neighbor 10.1.3.2 next-hop-unchanged + # - neighbor 10.1.3.2 prefix-list prefix01 out + # - neighbor peer1 fall-over bfd + # - neighbor peer1 link-bandwidth update-delay 5 + # - neighbor peer1 monitoring + # - neighbor peer1 send-community extended link-bandwidth aggregate 600 + # - redistribute static route-map map_static + # - redistribute attached-host + # - aggregate-address 1.2.1.0/24 as-set match-map match01 + # - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # - bgp host-routes fib direct-install + # - bgp convergence slow-peer time 6 + # - bgp additional-paths send any + # - bgp log-neighbor-changes + # - maximum-paths 55 + # - distance bgp 50 + # - vlan 5 + + + # Using parsed + + # parsed.cfg + # ---------- + # router bgp 100 + # bgp convergence slow-peer time 6 + # distance bgp 50 50 50 + # maximum-paths 55 + # bgp additional-paths send any + # neighbor peer1 peer group + # neighbor peer1 link-bandwidth update-delay 5 + # neighbor peer1 fall-over bfd + # neighbor peer1 monitoring + # neighbor peer1 send-community extended link-bandwidth aggregate 600 + # neighbor peer1 maximum-routes 12000 + # neighbor 10.1.3.2 export-localpref 4000 + # neighbor 10.1.3.2 next-hop-unchanged + # neighbor 10.1.3.2 dont-capability-negotiate + # neighbor 10.1.3.2 allowas-in 3 + # neighbor 10.1.3.2 default-originate always + # neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # aggregate-address 1.2.1.0/24 as-set match-map match01 + # aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # redistribute static route-map map_static + # redistribute attached-host + # ! + # vlan 5 + # ! + # address-family ipv4 + # neighbor 10.1.3.2 prefix-list prefix01 out + # ! + # vrf vrf01 + # route-target import 54:11 + # neighbor 12.1.3.2 dont-capability-negotiate + # neighbor 12.1.3.2 allowas-in 3 + # neighbor 12.1.3.2 default-originate always + # neighbor 12.1.3.2 maximum-routes 12000 + - name: Parse externally provided BGP config + arista.eos.eos_bgp_global: + running_config: "{{ lookup('file', 'parsed.cfg') }}" + state: parsed + + # Task output: + # ------------ + + # parsed: + # aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - fall_over: true + # link_bandwidth: + # set: true + # update_delay: 5 + # maximum_received_routes: + # count: 12000 + # monitoring: true + # neighbor_address: peer1 + # peer_group: peer1 + # send_community: + # community_attribute: extended + # link_bandwidth_attribute: aggregate + # speed: '600' + # sub_attribute: link-bandwidth + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vlan: 5 + # vrfs: + # - neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # maximum_received_routes: + # count: 12000 + # neighbor_address: 12.1.3.2 + # route_target: + # action: import + # target: '54:11' + # vrf: vrf01 + + # Using gathered + + # existing config + # veos(config)#show running-config | section bgp + # router bgp 100 + # bgp convergence slow-peer time 6 + # distance bgp 50 50 50 + # maximum-paths 55 + # bgp additional-paths send any + # neighbor peer1 peer group + # neighbor peer1 link-bandwidth update-delay 5 + # neighbor peer1 fall-over bfd + # neighbor peer1 monitoring + # neighbor peer1 send-community extended link-bandwidth aggregate 600 + # neighbor peer1 maximum-routes 12000 + # neighbor 10.1.3.2 export-localpref 4000 + # neighbor 10.1.3.2 next-hop-unchanged + # neighbor 10.1.3.2 dont-capability-negotiate + # neighbor 10.1.3.2 allowas-in 3 + # neighbor 10.1.3.2 default-originate always + # neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent + # aggregate-address 1.2.1.0/24 as-set match-map match01 + # aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only + # redistribute static route-map map_static + # redistribute attached-host + # ! + # vlan 5 + # ! + # address-family ipv4 + # neighbor 10.1.3.2 prefix-list prefix01 out + # ! + # vrf vrf01 + # route-target import 54:11 + # neighbor 12.1.3.2 dont-capability-negotiate + # neighbor 12.1.3.2 allowas-in 3 + # neighbor 12.1.3.2 default-originate always + # neighbor 12.1.3.2 maximum-routes 12000 + + - name: Gather BGP facts using gathered + arista.eos.eos_bgp_global: + state: gathered + + # Task output: + # ------------ + # gathered: + # aggregate_address: + # - address: 1.2.1.0/24 + # as_set: true + # match_map: match01 + # - address: 5.2.1.0/24 + # advertise_only: true + # attribute_map: attrmatch01 + # as_number: '100' + # bgp_params: + # additional_paths: send + # convergence: + # slow_peer: true + # time: 6 + # distance: + # external: 50 + # internal: 50 + # local: 50 + # maximum_paths: + # max_equal_cost_paths: 55 + # neighbor: + # - fall_over: true + # link_bandwidth: + # set: true + # update_delay: 5 + # maximum_received_routes: + # count: 12000 + # monitoring: true + # neighbor_address: peer1 + # peer_group: peer1 + # send_community: + # community_attribute: extended + # link_bandwidth_attribute: aggregate + # speed: '600' + # sub_attribute: link-bandwidth + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # export_localpref: 4000 + # maximum_received_routes: + # count: 500 + # warning_limit: + # limit_percent: 5 + # neighbor_address: 10.1.3.2 + # next_hop_unchanged: true + # redistribute: + # - protocol: static + # route_map: map_static + # - protocol: attached-host + # vlan: 5 + # vrfs: + # - neighbor: + # - allowas_in: + # count: 3 + # default_originate: + # always: true + # dont_capability_negotiate: true + # maximum_received_routes: + # count: 12000 + # neighbor_address: 12.1.3.2 + # route_target: + # action: import + # target: '54:11' + # vrf: vrf01 + + + +Return Values +------------- +Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: + +.. raw:: html + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Key</th> + <th>Returned</th> + <th width="100%">Description</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>after</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when changed</td> + <td> + <div>The resulting configuration model invocation.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format + of the parameters above.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>before</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>always</td> + <td> + <div>The configuration prior to the model invocation.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format + of the parameters above.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>commands</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>always</td> + <td> + <div>The set of commands pushed to the remote device.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router bgp 100', 'neighbor 10.1.3.2 allowas-in', 'neighbor 10.1.3.2 default-originate always', 'neighbor 10.1.3.2 dont-capability-negotiate']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router bgp 100', 'neighbor 10.1.3.2 allowas-in', 'neighbor 10.1.3.2 default-originate always', 'neighbor 10.1.3.2 dont-capability-negotiate']</div> + </td> + </tr> + </table> + <br/><br/> Status diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_module.rst index 76ff60dbb..21f57f30b 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_bgp_module.rst @@ -869,67 +869,67 @@ Examples router_id: 192.0.2.1 log_neighbor_changes: true neighbors: - - neighbor: 203.0.113.5 - remote_as: 64511 - timers: - keepalive: 300 - holdtime: 360 - - neighbor: 198.51.100.2 - remote_as: 64498 + - neighbor: 203.0.113.5 + remote_as: 64511 + timers: + keepalive: 300 + holdtime: 360 + - neighbor: 198.51.100.2 + remote_as: 64498 networks: - - prefix: 198.51.100.0 - route_map: RMAP_1 - - prefix: 192.0.2.0 - masklen: 23 - address_family: - - afi: ipv4 - safi: unicast - redistribute: - - protocol: isis + - prefix: 198.51.100.0 route_map: RMAP_1 + - prefix: 192.0.2.0 + masklen: 23 + address_family: + - afi: ipv4 + safi: unicast + redistribute: + - protocol: isis + route_map: RMAP_1 operation: merge - name: Configure BGP neighbors arista.eos.eos_bgp: config: bgp_as: 64496 neighbors: - - neighbor: 192.0.2.10 - remote_as: 64496 - description: IBGP_NBR_1 - ebgp_multihop: 100 - timers: - keepalive: 300 - holdtime: 360 - - neighbor: 192.0.2.15 - remote_as: 64496 - description: IBGP_NBR_2 - ebgp_multihop: 150 + - neighbor: 192.0.2.10 + remote_as: 64496 + description: IBGP_NBR_1 + ebgp_multihop: 100 + timers: + keepalive: 300 + holdtime: 360 + - neighbor: 192.0.2.15 + remote_as: 64496 + description: IBGP_NBR_2 + ebgp_multihop: 150 operation: merge - name: Configure root-level networks for BGP arista.eos.eos_bgp: config: bgp_as: 64496 networks: - - prefix: 203.0.113.0 - masklen: 27 - route_map: RMAP_1 - - prefix: 203.0.113.32 - masklen: 27 - route_map: RMAP_2 + - prefix: 203.0.113.0 + masklen: 27 + route_map: RMAP_1 + - prefix: 203.0.113.32 + masklen: 27 + route_map: RMAP_2 operation: merge - name: Configure BGP neighbors under address family mode arista.eos.eos_bgp: config: bgp_as: 64496 address_family: - - afi: ipv4 - neighbors: - - neighbor: 203.0.113.10 - activate: yes - default_originate: true - - neighbor: 192.0.2.15 - activate: yes - graceful_restart: true + - afi: ipv4 + neighbors: + - neighbor: 203.0.113.10 + activate: true + default_originate: true + - neighbor: 192.0.2.15 + activate: true + graceful_restart: true operation: merge - name: remove bgp as 64496 from config arista.eos.eos_bgp: diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_command_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_command_module.rst index c9640062c..8049a976f 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_command_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_command_module.rst @@ -300,23 +300,23 @@ Examples - name: run multiple commands on remote nodes arista.eos.eos_command: commands: - - show version - - show interfaces + - show version + - show interfaces - name: run multiple commands and evaluate the output arista.eos.eos_command: commands: - - show version - - show interfaces + - show version + - show interfaces wait_for: - - result[0] contains Arista - - result[1] contains Loopback0 + - result[0] contains Arista + - result[1] contains Loopback0 - name: run commands and specify the output format arista.eos.eos_command: commands: - - command: show version - output: json + - command: show version + output: json - name: check whether the switch is in maintenance mode arista.eos.eos_command: @@ -326,8 +326,8 @@ Examples - name: check whether the switch is in maintenance mode using json output arista.eos.eos_command: commands: - - command: show maintenance - output: json + - command: show maintenance + output: json wait_for: result[0].units.System.state eq 'underMaintenance' - name: check whether the switch is in maintenance, with 8 retries @@ -343,10 +343,10 @@ Examples need to be escaped. arista.eos.eos_command: commands: - - command: reload power - prompt: \[confirm\] - answer: y - newline: false + - command: reload power + prompt: \[confirm\] + answer: y + newline: false diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_config_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_config_module.rst index a0711557a..100a809fe 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_config_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_config_module.rst @@ -80,7 +80,7 @@ Parameters <td> </td> <td> - <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>yes</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div> + <div>This is a dict object containing configurable options related to backup file path. The value of this option is read only when <code>backup</code> is set to <em>true</em>, if <code>backup</code> is set to <em>no</em> this option will be silently ignored.</div> </td> </tr> <tr> @@ -361,10 +361,10 @@ Examples - name: load an acl into the device arista.eos.eos_config: lines: - - 10 permit ip host 192.0.2.1 any log - - 20 permit ip host 192.0.2.2 any log - - 30 permit ip host 192.0.2.3 any log - - 40 permit ip host 192.0.2.4 any log + - 10 permit ip host 192.0.2.1 any log + - 20 permit ip host 192.0.2.2 any log + - 30 permit ip host 192.0.2.3 any log + - 40 permit ip host 192.0.2.4 any log parents: ip access-list test before: no ip access-list test replace: block @@ -375,7 +375,7 @@ Examples - name: render a Jinja2 template onto an Arista switch arista.eos.eos_config: - backup: yes + backup: true src: eos_template.j2 - name: diff the running config against a master config @@ -386,15 +386,13 @@ Examples - name: for idempotency, use full-form commands arista.eos.eos_config: lines: - # - shut - - shutdown - # parents: int eth1 + - shutdown parents: interface Ethernet1 - name: configurable backup path arista.eos.eos_config: src: eos_template.j2 - backup: yes + backup: true backup_options: filename: backup.cfg dir_path: /home/user @@ -422,7 +420,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">string</span> </div> </td> - <td>when backup is yes</td> + <td>when backup is true</td> <td> <div>The full path to the backup file</div> <br/> @@ -456,7 +454,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">string</span> </div> </td> - <td>when backup is yes</td> + <td>when backup is true</td> <td> <div>The date extracted from the backup file name</div> <br/> @@ -473,7 +471,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">string</span> </div> </td> - <td>when backup is yes and filename is not specified in backup options</td> + <td>when backup is true and filename is not specified in backup options</td> <td> <div>The name of the backup file</div> <br/> @@ -490,7 +488,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">string</span> </div> </td> - <td>when backup is yes and filename is not specified in backup options</td> + <td>when backup is true and filename is not specified in backup options</td> <td> <div>The full path to the backup file excluding the timestamp</div> <br/> @@ -507,7 +505,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">string</span> </div> </td> - <td>when backup is yes</td> + <td>when backup is true</td> <td> <div>The time extracted from the backup file name</div> <br/> diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_eapi_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_eapi_module.rst index 5d6b54b3d..24d238d06 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_eapi_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_eapi_module.rst @@ -254,9 +254,9 @@ Examples state: started http: false https_port: 9443 - local_http: yes + local_http: true local_http_port: 80 - socket: yes + socket: true - name: Shutdown eAPI access arista.eos.eos_eapi: diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_facts_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_facts_module.rst index ad9a7fa34..dbe6d5af7 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_facts_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_facts_module.rst @@ -103,12 +103,12 @@ Examples - name: Gather only the config and default facts arista.eos.eos_facts: gather_subset: - - config + - config - name: Do not gather hardware facts arista.eos.eos_facts: gather_subset: - - '!hardware' + - '!hardware' - name: Gather legacy and resource facts arista.eos.eos_facts: @@ -118,10 +118,10 @@ Examples - name: Gather only the interfaces resource facts and no legacy facts - arista.eos.eos_facts: gather_subset: - - '!all' - - '!min' + - '!all' + - '!min' gather_network_resources: - - interfaces + - interfaces - name: Gather all resource facts and minimal legacy facts arista.eos.eos_facts: diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_hostname_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_hostname_module.rst index 382a59f6d..d7080f945 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_hostname_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_hostname_module.rst @@ -219,7 +219,7 @@ Examples # Using state: gathered # Before state: # ------------- - #test#show running-config | section ^hostname + # test#show running-config | section ^hostname # hostname eosTest # Gathered play: # -------------- diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_interfaces_module.rst index cebb499c4..64ced4d9b 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_interfaces_module.rst @@ -224,7 +224,7 @@ Notes .. note:: - Tested against Arista EOS 4.24.6F - - This module works with connection ``network_cli``. See the `EOS Platform Options <../network/user_guide/platform_eos.html>`_. + - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_eos.html @@ -238,191 +238,283 @@ Examples # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # description "Interface 1" # ! # interface Ethernet2 # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route - name: Merge provided configuration with device configuration arista.eos.eos_interfaces: config: - - name: Ethernet1 - enabled: true - mode: layer3 - - name: Ethernet2 - description: Configured by Ansible - enabled: false + - name: Ethernet1 + enabled: true + mode: layer3 + - name: Ethernet2 + description: Configured by Ansible + enabled: false state: merged + # Task Output + # ----------- + # + # before: + # - enabled: true + # name: Ethernet1 + # - enabled: true + # name: Ethernet2 + # - enabled: true + # name: Management1 + # commands: + # - interface Ethernet1 + # - no switchport + # - interface Ethernet2 + # - shutdown + # - description Configured by Ansible + # after: + # - enabled: true + # mode: layer3 + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # description "Interface 1" # no switchport # ! # interface Ethernet2 - # description "Configured by Ansible" + # description Configured by Ansible # shutdown # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route # Using replaced # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # description "Interface 1" + # no switchport # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route - name: Replaces device configuration of listed interfaces with provided configuration arista.eos.eos_interfaces: config: - - name: Ethernet1 - enabled: true - - name: Ethernet2 - description: Configured by Ansible - enabled: false + - name: Ethernet1 + enabled: true + - name: Ethernet2 + description: Configured by Ansible + enabled: false state: replaced + # Task Output + # ----------- + # + # before: + # - enabled: true + # mode: layer3 + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # commands: + # - interface Ethernet1 + # - switchport + # after: + # - enabled: true + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # ! # interface Ethernet2 - # description "Configured by Ansible" + # description Configured by Ansible # shutdown # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route # Using overridden # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # description "Interface 1" # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route - name: Overrides all device configuration with provided configuration arista.eos.eos_interfaces: config: - - name: Ethernet1 - enabled: true - - name: Ethernet2 - description: Configured by Ansible - enabled: false + - name: Ethernet1 + enabled: true + - name: Ethernet2 + description: Configured by Ansible + enabled: false state: overridden + # Task Output + # ----------- + # + # before: + # - enabled: true + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # commands: + # - interface Management1 + # - no shutdown + # after: + # - enabled: true + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # ! # interface Ethernet2 - # description "Configured by Ansible" + # description Configured by Ansible # shutdown # ! # interface Management1 # ip address dhcp - # ! + # dhcp client accept default-route # Using deleted # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # description "Interface 1" - # no switchport # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route - name: Delete or return interface parameters to default settings arista.eos.eos_interfaces: config: - - name: Ethernet1 + - name: Ethernet1 state: deleted + # Task Output + # ----------- + # + # before: + # - enabled: true + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # commands: + # - interface Ethernet1 + # - no shutdown + # after: + # - enabled: true + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # ! # interface Management1 - # description "Management interface" # ip address dhcp - # ! + # dhcp client accept default-route # Using rendered - - name: Use Rendered to convert the structured data to native config + - name: Render the provided configuration into platform specific configuration lines arista.eos.eos_interfaces: config: - - name: Ethernet1 - enabled: true - mode: layer3 - - name: Ethernet2 - description: Configured by Ansible - enabled: false - state: merged - - # Output: - # ------------ - - # - "interface Ethernet1" - # - "description "Interface 1"" - # - "no swithcport" - # - "interface Ethernet2" - # - "description "Configured by Ansible"" - # - "shutdown" - # - "interface Management1" - # - "description "Management interface"" - # - "ip address dhcp" - - # Using parsed - # parsed.cfg - + - name: Ethernet1 + enabled: true + mode: layer3 + - name: Ethernet2 + description: Configured by Ansible + enabled: false + state: rendered + + # Module Execution Result: + # ------------------------ + # + # rendered: + # - interface Ethernet1 + # - no shutdown + # - no switchport + # - interface Ethernet2 + # - shutdown + # - description Configured by Ansible + + # Using Parsed + + # File: parsed.cfg + # ---------------- + # # interface Ethernet1 # description "Interface 1" # ! @@ -431,46 +523,54 @@ Examples # shutdown # ! - - name: Use parsed to convert native configs to structured data + - name: Parse the commands for provided configuration arista.eos.interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed - # Output + # Module Execution Result: + # ------------------------ + # # parsed: - # - name: Ethernet1 - # enabled: True - # mode: layer2 - # - name: Ethernet2 - # description: 'Configured by Ansible' - # enabled: False - # mode: layer2 - - # Using gathered: - - # Existing config on the device - # ----------------------------- + # - name: Ethernet1 + # enabled: True + # mode: layer2 + # - name: Ethernet2 + # description: 'Configured by Ansible' + # enabled: False + # mode: layer2 + + # Using Gathered + + # Before state: + # ------------- + # + # test#show running-config | section interface # interface Ethernet1 - # description "Interface 1" # ! # interface Ethernet2 - # description "Configured by Ansible" + # description Configured by Ansible # shutdown # ! + # interface Management1 + # ip address dhcp + # dhcp client accept default-route - name: Gather interfaces facts from the device arista.eos.interfaces: state: gathered - # output + # Module Execution Result: + # ------------------------ + # # gathered: - # - name: Ethernet1 - # enabled: True - # mode: layer2 - # - name: Ethernet2 - # description: 'Configured by Ansible' - # enabled: False - # mode: layer2 + # - enabled: true + # name: Ethernet1 + # - description: Configured by Ansible + # enabled: false + # name: Ethernet2 + # - enabled: true + # name: Management1 @@ -497,10 +597,10 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late </td> <td>when changed</td> <td> - <div>The configuration as structured data after module completion.</div> + <div>The resulting configuration after module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -512,12 +612,12 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">dictionary</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> - <div>The configuration as structured data prior to module invocation.</div> + <div>The configuration prior to the module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -529,12 +629,63 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">list</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> <div>The set of commands pushed to the remote device.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet2', 'shutdown', 'speed 10full']</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet1', 'no shutdown', 'no switchport']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet1', 'no shutdown', 'no switchport']</div> </td> </tr> </table> @@ -548,4 +699,4 @@ Status Authors ~~~~~~~ -- Nathaniel Case (@qalthos) +- Nathaniel Case (@Qalthos) diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_l2_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_l2_interfaces_module.rst index b487ae2b3..a6176d51f 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_l2_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_l2_interfaces_module.rst @@ -224,7 +224,7 @@ Notes .. note:: - Tested against Arista EOS 4.24.6F - - This module works with connection ``network_cli``. See the `EOS Platform Options <../network/user_guide/platform_eos.html>`_. + - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_eos.html @@ -238,205 +238,307 @@ Examples # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # switchport access vlan 20 # ! # interface Ethernet2 - # switchport trunk native vlan 20 - # switchport mode trunk + # description Configured by Ansible + # shutdown # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route - name: Merge provided configuration with device configuration. arista.eos.eos_l2_interfaces: config: - - name: Ethernet1 - mode: trunk - trunk: - native_vlan: 10 - - name: Ethernet2 - mode: access - access: - vlan: 30 + - name: Ethernet1 + mode: trunk + trunk: + native_vlan: 10 + - name: Ethernet2 + mode: access + access: + vlan: 30 state: merged + # Task Output + # ----------- + # + # before: + # - name: Ethernet1 + # - name: Ethernet2 + # - name: Management1 + # commands: + # - interface Ethernet1 + # - switchport mode trunk + # - switchport trunk native vlan 10 + # - interface Ethernet2 + # - switchport mode access + # - switchport access vlan 30 + # after: + # - mode: trunk + # name: Ethernet1 + # trunk: + # native_vlan: 10 + # - access: + # vlan: 30 + # name: Ethernet2 + # - name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # switchport trunk native vlan 10 # switchport mode trunk # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # switchport access vlan 30 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route # Using replaced # Before state: # ------------- # - # veos2#show running-config | s int + # test#show running-config | section interface # interface Ethernet1 - # switchport access vlan 20 + # switchport trunk native vlan 10 + # switchport mode trunk # ! # interface Ethernet2 - # switchport trunk native vlan 20 - # switchport mode trunk + # description Configured by Ansible + # shutdown + # switchport access vlan 30 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route - name: Replace device configuration of specified L2 interfaces with provided configuration. arista.eos.eos_l2_interfaces: config: - - name: Ethernet1 - mode: trunk - trunk: - native_vlan: 20 - trunk_allowed_vlans: 5-10, 15 + - name: Ethernet1 + mode: trunk + trunk: + native_vlan: 20 + trunk_allowed_vlans: 5-10, 15 state: replaced + # Task Output + # ----------- + # + # before: + # - mode: trunk + # name: Ethernet1 + # trunk: + # native_vlan: 10 + # - access: + # vlan: 30 + # name: Ethernet2 + # - name: Management1 + # commands: + # - interface Ethernet1 + # - switchport trunk native vlan 20 + # - switchport trunk allowed vlan 10,15,5,6,7,8,9 + # after: + # - mode: trunk + # name: Ethernet1 + # trunk: + # native_vlan: 20 + # trunk_allowed_vlans: + # - 5-10 + # - '15' + # - access: + # vlan: 30 + # name: Ethernet2 + # - name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # switchport trunk native vlan 20 # switchport trunk allowed vlan 5-10,15 # switchport mode trunk # ! # interface Ethernet2 - # switchport trunk native vlan 20 - # switchport mode trunk + # description Configured by Ansible + # shutdown + # switchport access vlan 30 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route # Using overridden # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # switchport access vlan 20 - # ! - # interface Ethernet2 # switchport trunk native vlan 20 + # switchport trunk allowed vlan 5-10,15 # switchport mode trunk # ! + # interface Ethernet2 + # description Configured by Ansible + # shutdown + # switchport access vlan 30 + # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route - name: Override device configuration of all L2 interfaces on device with provided configuration. arista.eos.eos_l2_interfaces: config: - - name: Ethernet2 - mode: access - access: - vlan: 30 + - name: Ethernet2 + mode: access + access: + vlan: 30 state: overridden + # Task Output + # ----------- + # + # before: + # - mode: trunk + # name: Ethernet1 + # trunk: + # native_vlan: 20 + # trunk_allowed_vlans: + # - 5-10 + # - '15' + # - access: + # vlan: 30 + # name: Ethernet2 + # - name: Management1 + # commands: + # - interface Ethernet1 + # - no switchport mode + # - no switchport trunk allowed vlan + # - no switchport trunk native vlan + # - interface Ethernet2 + # - switchport mode access + # after: + # - name: Ethernet1 + # - access: + # vlan: 30 + # name: Ethernet2 + # - name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # switchport access vlan 30 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route # Using deleted # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # switchport access vlan 20 # ! # interface Ethernet2 - # switchport trunk native vlan 20 - # switchport mode trunk + # description Configured by Ansible + # shutdown + # switchport access vlan 30 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - # ! + # dhcp client accept default-route - name: Delete EOS L2 interfaces as in given arguments. arista.eos.eos_l2_interfaces: config: - - name: Ethernet1 - - name: Ethernet2 + - name: Ethernet1 + - name: Ethernet2 state: deleted + # Task Output + # ----------- + # + # before: + # - name: Ethernet1 + # - access: + # vlan: 30 + # name: Ethernet2 + # - name: Management1 + # commands: + # - interface Ethernet2 + # - no switchport access vlan + # after: + # - name: Ethernet1 + # - name: Ethernet2 + # - name: Management1 + # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route # using rendered - name: Use Rendered to convert the structured data to native config arista.eos.eos_l2_interfaces: config: - - name: Ethernet1 - mode: trunk - trunk: - native_vlan: 10 - - name: Ethernet2 - mode: access - access: - vlan: 30 - state: merged - - # Output : - # ------------ + - name: Ethernet1 + mode: trunk + trunk: + native_vlan: 10 + - name: Ethernet2 + mode: access + access: + vlan: 30 + state: rendered + + # Module Execution Result: + # ------------------------ + # + # rendered: + # - interface Ethernet1 + # - switchport mode trunk + # - switchport trunk native vlan 10 + # - interface Ethernet2 + # - switchport mode access + # - switchport access vlan 30 + + # Using parsed + + # File: parsed.cfg + # ---------------- # - # - "interface Ethernet1" - # - "switchport trunk native vlan 10" - # - "switchport mode trunk" - # - "interface Ethernet2" - # - "switchport access vlan 30" - # - "interface Management1" - # - "ip address dhcp" - # - "ipv6 address auto-config" - - - # using parsed - - # parsed.cfg - # interface Ethernet1 # switchport trunk native vlan 10 # switchport mode trunk @@ -445,25 +547,28 @@ Examples # switchport access vlan 30 # ! - - name: Use parsed to convert native configs to structured data + - name: Parse the commands for provided configuration arista.eos.l2_interfaces: running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed - # Output: - # parsed: - # - name: Ethernet1 - # mode: trunk - # trunk: - # native_vlan: 10 - # - name: Ethernet2 - # mode: access - # access: - # vlan: 30 - + # Module Execution Result: + # ------------------------ + # + # parsed: + # - name: Ethernet1 + # mode: trunk + # trunk: + # native_vlan: 10 + # - name: Ethernet2 + # mode: access + # access: + # vlan: 30 + + # Using gathered - # Using gathered: - # Existing config on the device: + # Before state: + # ------------- # # veos#show running-config | section interface # interface Ethernet1 @@ -477,16 +582,19 @@ Examples - name: Gather interfaces facts from the device arista.eos.l2_interfaces: state: gathered - # output: - # gathered: - # - name: Ethernet1 - # mode: trunk - # trunk: - # native_vlan: 10 - # - name: Ethernet2 - # mode: access - # access: - # vlan: 30 + + # Module Execution Result: + # ------------------------ + # + # gathered: + # - name: Ethernet1 + # mode: trunk + # trunk: + # native_vlan: 10 + # - name: Ethernet2 + # mode: access + # access: + # vlan: 30 @@ -508,15 +616,15 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <b>after</b> <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> <div style="font-size: small"> - <span style="color: purple">list</span> + <span style="color: purple">dictionary</span> </div> </td> <td>when changed</td> <td> - <div>The configuration as structured data after module completion.</div> + <div>The resulting configuration after module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -525,15 +633,15 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <b>before</b> <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> <div style="font-size: small"> - <span style="color: purple">list</span> + <span style="color: purple">dictionary</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> - <div>The configuration as structured data prior to module invocation.</div> + <div>The configuration prior to the module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -545,12 +653,63 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">list</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> <div>The set of commands pushed to the remote device.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet2', 'switchport access vlan 20']</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet1', 'switchport mode trunk', 'switchport access vlan 20']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet1', 'switchport mode trunk', 'switchport access vlan 20']</div> </td> </tr> </table> @@ -564,4 +723,4 @@ Status Authors ~~~~~~~ -- Nathaniel Case (@qalthos) +- Nathaniel Case (@Qalthos) diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_l3_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_l3_interfaces_module.rst index c6615fc0d..495e31507 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_l3_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_l3_interfaces_module.rst @@ -229,7 +229,7 @@ Notes .. note:: - Tested against Arista EOS 4.24.6F - - This module works with connection ``network_cli``. See the `EOS Platform Options <../network/user_guide/platform_eos.html>`_. 'eos_l2_interfaces/eos_interfaces' should be used for preparing the interfaces , before applying L3 configurations using this module (eos_l3_interfaces). + - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_eos.html 'eos_l2_interfaces/eos_interfaces' should be used for preparing the interfaces, before applying L3 configurations using this module (eos_l3_interfaces). @@ -238,170 +238,276 @@ Examples .. code-block:: yaml - # Using deleted + # Using merged # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # ip address 192.0.2.12/24 # ! # interface Ethernet2 - # ipv6 address 2001:db8::1/64 + # description Configured by Ansible + # shutdown # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route - - name: Delete L3 attributes of given interfaces. + - name: Merge provided configuration with device configuration. arista.eos.eos_l3_interfaces: config: - - name: Ethernet1 - - name: Ethernet2 - state: deleted + - name: Ethernet1 + ipv4: + - address: 198.51.100.14/24 + - name: Ethernet2 + ipv4: + - address: 203.0.113.27/24 + state: merged + + # Task Output + # ----------- + # + # before: + # - name: Ethernet1 + # - name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 + # commands: + # - interface Ethernet1 + # - ip address 198.51.100.14/24 + # - interface Ethernet2 + # - ip address 203.0.113.27/24 + # after: + # - ipv4: + # - address: 198.51.100.14/24 + # name: Ethernet1 + # - ipv4: + # - address: 203.0.113.27/24 + # name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 + # ip address 198.51.100.14/24 # ! # interface Ethernet2 + # description Configured by Ansible + # shutdown + # ip address 203.0.113.27/24 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - + # dhcp client accept default-route - # Using merged + # Using overridden # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # ip address 192.0.2.12/24 + # ip address 198.51.100.14/24 # ! # interface Ethernet2 - # ipv6 address 2001:db8::1/64 + # ip address 203.0.113.27/24 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route - - name: Merge provided configuration with device configuration. + - name: Override device configuration of all L2 interfaces on device with provided + configuration. arista.eos.eos_l3_interfaces: config: - - name: Ethernet1 - ipv4: - - address: 198.51.100.14/24 - - name: Ethernet2 - ipv4: - - address: 203.0.113.27/24 - state: merged + - name: Ethernet1 + ipv6: + - address: 2001:db8:feed::1/96 + - name: Ethernet2 + ipv4: + - address: 203.0.113.27/24 + - ipv4: + - address: dhcp + name: Management1 + state: overridden + + # Task Output + # ----------- + # + # before: + # - ipv4: + # - address: 198.51.100.14/24 + # name: Ethernet1 + # - ipv4: + # - address: 203.0.113.27/24 + # name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 + # commands: + # - interface Ethernet1 + # - ipv6 address 2001:db8:feed::1/96 + # - no ip address + # after: + # - ipv6: + # - address: 2001:db8:feed::1/96 + # name: Ethernet1 + # - ipv4: + # - address: 203.0.113.27/24 + # name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # ip address 198.51.100.14/24 + # ipv6 address 2001:db8:feed::1/96 # ! # interface Ethernet2 # ip address 203.0.113.27/24 - # ipv6 address 2001:db8::1/64 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config - + # dhcp client accept default-route - # Using overridden + # Using replaced # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # ip address 192.0.2.12/24 + # ipv6 address 2001:db8:feed::1/96 # ! # interface Ethernet2 - # ipv6 address 2001:db8::1/64 + # ip address 203.0.113.27/24 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route - - name: Override device configuration of all L2 interfaces on device with provided - configuration. + - name: Replace device configuration of specified L2 interfaces with provided configuration. arista.eos.eos_l3_interfaces: config: - - name: Ethernet1 - ipv6: - - address: 2001:db8:feed::1/96 - - name: Management1 - ipv4: - - address: dhcp - ipv6: auto-config - state: overridden + - name: Ethernet2 + ipv4: + - address: 203.0.113.27/24 + state: replaced + + # Task Output + # ----------- + # + # before: + # - ipv6: + # - address: 2001:db8:feed::1/96 + # name: Ethernet1 + # - ipv4: + # - address: 203.0.113.27/24 + # name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 + # commands: + # - interface Ethernet2 + # - ip address 203.0.113.28/24 + # after: + # - ipv6: + # - address: 2001:db8:feed::1/96 + # name: Ethernet1 + # - ipv4: + # - address: 203.0.113.28/24 + # name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 # ipv6 address 2001:db8:feed::1/96 # ! # interface Ethernet2 + # ip address 203.0.113.28/24 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route - - # Using replaced + # Using deleted # Before state: # ------------- # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # ip address 192.0.2.12/24 + # ipv6 address 2001:db8:feed::1/96 # ! # interface Ethernet2 - # ipv6 address 2001:db8::1/64 + # ip address 203.0.113.28/24 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route - - name: Replace device configuration of specified L2 interfaces with provided configuration. + - name: Delete L3 attributes of given interfaces. arista.eos.eos_l3_interfaces: config: - - name: Ethernet2 - ipv4: - - address: 203.0.113.27/24 - state: replaced + - name: Ethernet1 + - name: Ethernet2 + state: deleted + + # Task Output + # ----------- + # + # before: + # - ipv6: + # - address: 2001:db8:feed::1/96 + # name: Ethernet1 + # - ipv4: + # - address: 203.0.113.28/24 + # name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 + # commands: + # - interface Ethernet1 + # - no ipv6 address 2001:db8:feed::1/96 + # - interface Ethernet2 + # - no ip address + # after: + # - name: Ethernet1 + # - name: Ethernet2 + # - ipv4: + # - address: dhcp + # name: Management1 # After state: # ------------ # - # veos#show running-config | section interface + # test#show running-config | section interface # interface Ethernet1 - # ip address 192.0.2.12/24 # ! # interface Ethernet2 - # ip address 203.0.113.27/24 # ! # interface Management1 # ip address dhcp - # ipv6 address auto-config + # dhcp client accept default-route - # Using parsed: + # Using Parsed - # parsed.cfg - # ------------ + # File: parsed.cfg + # ---------------- # # veos#show running-config | section interface # interface Ethernet1 @@ -416,41 +522,45 @@ Examples running_config: "{{ lookup('file', 'parsed.cfg') }}" state: parsed - # Output: - + # Module Execution Result: + # ------------------------ + # # parsed: - # - name: Ethernet1 - # ipv4: - # - address: 198.51.100.14/24 - # - name: Ethernet2 - # ipv4: - # - address: 203.0.113.27/24 + # - name: Ethernet1 + # ipv4: + # - address: 198.51.100.14/24 + # - name: Ethernet2 + # ipv4: + # - address: 203.0.113.27/24 # Using rendered: - name: Use Rendered to convert the structured data to native config arista.eos.eos_l3_interfaces: config: - - name: Ethernet1 - ipv4: - - address: 198.51.100.14/24 - - name: Ethernet2 - ipv4: - - address: 203.0.113.27/24 + - name: Ethernet1 + ipv4: + - address: 198.51.100.14/24 + - name: Ethernet2 + ipv4: + - address: 203.0.113.27/24 state: rendered - # Output - # ------------ - #rendered: - # - "interface Ethernet1" - # - "ip address 198.51.100.14/24" - # - "interface Ethernet2" - # - "ip address 203.0.113.27/24" + # Module Execution Result: + # ------------------------ + # + # rendered: + # - interface Ethernet1 + # - ip address 198.51.100.14/24 + # - interface Ethernet2 + # - ip address 203.0.113.27/24 # using gathered: - # Native COnfig: - # veos#show running-config | section interface + # Before state: + # ------------- + # + # test#show running-config | section interface # interface Ethernet1 # ip address 198.51.100.14/24 # ! @@ -462,13 +572,16 @@ Examples arista.eos.l3_interfaces: state: gathered - # gathered: - # - name: Ethernet1 - # ipv4: - # - address: 198.51.100.14/24 - # - name: Ethernet2 - # ipv4: - # - address: 203.0.113.27/24 + # Module Execution Result: + # ------------------------ + # + # gathered: + # - name: Ethernet1 + # ipv4: + # - address: 198.51.100.14/24 + # - name: Ethernet2 + # ipv4: + # - address: 203.0.113.27/24 @@ -490,16 +603,15 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <b>after</b> <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> <div style="font-size: small"> - <span style="color: purple">list</span> + <span style="color: purple">dictionary</span> </div> </td> <td>when changed</td> <td> - <div>The configuration as structured data after module completion.</div> + <div>The resulting configuration after module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format - of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -508,16 +620,15 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <b>before</b> <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> <div style="font-size: small"> - <span style="color: purple">list</span> + <span style="color: purple">dictionary</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> - <div>The configuration as structured data prior to module invocation.</div> + <div>The configuration prior to the module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format - of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -529,12 +640,63 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">list</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> <div>The set of commands pushed to the remote device.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet2', 'ip address 192.0.2.12/24']</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet1', 'ip address 198.51.100.14/24', 'ipv6 address 2001:db8:feed::1/96']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Ethernet1', 'ip address 198.51.100.14/24', 'ipv6 address 2001:db8:feed::1/96']</div> </td> </tr> </table> @@ -548,4 +710,4 @@ Status Authors ~~~~~~~ -- Nathaniel Case (@qalthos) +- Nathaniel Case (@Qalthos) diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_interfaces_module.rst index dbe2ffa98..5570e69ca 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_interfaces_module.rst @@ -179,10 +179,10 @@ Examples - name: Merge provided configuration with device configuration arista.eos.eos_lacp_interfaces: config: - - name: Ethernet1 - rate: fast - - name: Ethernet2 - rate: normal + - name: Ethernet1 + rate: fast + - name: Ethernet2 + rate: normal state: merged # @@ -204,7 +204,6 @@ Examples # Before state # ------------ # - # # veos#show run | section ^interface # interface Ethernet1 # lacp port-priority 30 @@ -215,8 +214,8 @@ Examples configuration arista.eos.eos_lacp_interfaces: config: - - name: Ethernet1 - rate: fast + - name: Ethernet1 + rate: fast state: replaced # @@ -248,8 +247,8 @@ Examples - name: Override the LACP configuration of all the interfaces with provided configuration arista.eos.eos_lacp_interfaces: config: - - name: Ethernet1 - rate: fast + - name: Ethernet1 + rate: fast state: overridden # @@ -295,10 +294,10 @@ Examples - name: Use Rendered to convert the structured data to native config arista.eos.eos_lacp_interfaces: config: - - name: Ethernet1 - rate: fast - - name: Ethernet2 - rate: normal + - name: Ethernet1 + rate: fast + - name: Ethernet2 + rate: normal state: rendered # diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_module.rst index c843c1805..a7f56ea78 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_lacp_module.rst @@ -201,7 +201,7 @@ Examples # veos# show running-config | include lacp # - #Using rendered: + # Using rendered: - name: Use Rendered to convert the structured data to native config arista.eos.eos_lacp: diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_lag_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_lag_interfaces_module.rst index f41e3d283..4caabb004 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_lag_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_lag_interfaces_module.rst @@ -196,10 +196,10 @@ Examples - name: Merge provided LAG attributes with existing device configuration arista.eos.eos_lag_interfaces: config: - - name: 5 - members: - - member: Ethernet2 - mode: on + - name: 5 + members: + - member: Ethernet2 + mode: on state: merged # After state: @@ -225,10 +225,10 @@ Examples - name: Replace all device configuration of specified LAGs with provided configuration arista.eos.eos_lag_interfaces: config: - - name: 5 - members: - - member: Ethernet2 - mode: on + - name: 5 + members: + - member: Ethernet2 + mode: on state: replaced # After state: @@ -253,10 +253,10 @@ Examples - name: Override all device configuration of all LAG attributes with provided configuration arista.eos.eos_lag_interfaces: config: - - name: 10 - members: - - member: Ethernet2 - mode: on + - name: 10 + members: + - member: Ethernet2 + mode: on state: overridden # After state: @@ -282,9 +282,9 @@ Examples - name: Delete LAG attributes of the given interfaces. arista.eos.eos_lag_interfaces: config: - - name: 5 - members: - - member: Ethernet1 + - name: 5 + members: + - member: Ethernet1 state: deleted # After state: @@ -322,12 +322,12 @@ Examples - name: Use Rendered to convert the structured data to native config arista.eos.eos_lag_interfaces: config: - - name: 5 - members: - - member: Ethernet2 - mode: on - - member: Ethernet1 - mode: on + - name: 5 + members: + - member: Ethernet2 + mode: on + - member: Ethernet1 + mode: on state: rendered # ----------- # Output diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_lldp_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_lldp_interfaces_module.rst index 90463d9e0..b30a99ba8 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_lldp_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_lldp_interfaces_module.rst @@ -182,10 +182,10 @@ Examples - name: Merge provided configuration with running configuration arista.eos.eos_lldp_interfaces: config: - - name: Ethernet1 - transmit: false - - name: Ethernet2 - transmit: false + - name: Ethernet1 + transmit: false + - name: Ethernet2 + transmit: false state: merged # @@ -219,8 +219,8 @@ Examples configuration arista.eos.eos_lldp_interfaces: config: - - name: Ethernet1 - transmit: false + - name: Ethernet1 + transmit: false state: replaced # @@ -252,8 +252,8 @@ Examples - name: Override the LLDP configuration of all the interfaces with provided configuration arista.eos.eos_lldp_interfaces: config: - - name: Ethernet1 - transmit: false + - name: Ethernet1 + transmit: false state: overridden # @@ -300,10 +300,10 @@ Examples - name: Use Rendered to convert the structured data to native config arista.eos.eos_lldp_interfaces: config: - - name: Ethernet1 - transmit: false - - name: Ethernet2 - transmit: false + - name: Ethernet1 + transmit: false + - name: Ethernet2 + transmit: false state: rendered # diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_logging_global_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_logging_global_module.rst index d159d0de6..9c6684331 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_logging_global_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_logging_global_module.rst @@ -1144,29 +1144,28 @@ Examples .. code-block:: yaml # Using merged - # Before state # test(config)#show running-config | section logging # test(config)# - - name: Merge provided configuration with device configuration - arista.eos.eos_logging_global: - config: - hosts: - - name: "host01" - protocol: "tcp" - - name: "11.11.11.1" - port: 25 - vrfs: - - name: "vrf01" - source_interface: "Ethernet1" - - name: "vrf02" - hosts: - - name: "hostvrf1" - protocol: "tcp" - - name: "24.1.1.1" - port: "33" + - name: Merge provided configuration with device configuration + arista.eos.eos_logging_global: + config: + hosts: + - name: "host01" + protocol: "tcp" + - name: "11.11.11.1" + port: 25 + vrfs: + - name: "vrf01" + source_interface: "Ethernet1" + - name: "vrf02" + hosts: + - name: "hostvrf1" + protocol: "tcp" + - name: "24.1.1.1" + port: "33" # After State: @@ -1240,25 +1239,25 @@ Examples # logging level AAA alerts # test(config)# - - name: Repalce - arista.eos.eos_logging_global: - config: - synchronous: - set: True - trap: - severity: "critical" - hosts: - - name: "host02" - protocol: "tcp" - vrfs: - - name: "vrf03" - source_interface: "Vlan100" - - name: "vrf04" - hosts: - - name: "hostvrf1" - protocol: "tcp" - - state: replaced + - name: Repalce + arista.eos.eos_logging_global: + config: + synchronous: + set: true + trap: + severity: "critical" + hosts: + - name: "host02" + protocol: "tcp" + vrfs: + - name: "vrf03" + source_interface: "Vlan100" + - name: "vrf04" + hosts: + - name: "hostvrf1" + protocol: "tcp" + + state: replaced # After State: # test(config)#show running-config | section logging @@ -1279,7 +1278,7 @@ Examples # } # ], # "synchronous": { - # "set": True + # "set": true # }, # "trap": { # "severity": "critical" @@ -1389,25 +1388,25 @@ Examples # logging level AAA alerts # test(config)# - - name: Repalce - arista.eos.eos_logging_global: - config: - synchronous: - set: True - trap: - severity: "critical" - hosts: - - name: "host02" - protocol: "tcp" - vrfs: - - name: "vrf03" - source_interface: "Vlan100" - - name: "vrf04" - hosts: - - name: "hostvrf1" - protocol: "tcp" - - state: overridden + - name: Repalce + arista.eos.eos_logging_global: + config: + synchronous: + set: true + trap: + severity: "critical" + hosts: + - name: "host02" + protocol: "tcp" + vrfs: + - name: "vrf03" + source_interface: "Vlan100" + - name: "vrf04" + hosts: + - name: "hostvrf1" + protocol: "tcp" + + state: overridden # After State: # test(config)#show running-config | section logging @@ -1428,7 +1427,7 @@ Examples # } # ], # "synchronous": { - # "set": True + # "set": true # }, # "trap": { # "severity": "critical" @@ -1536,10 +1535,10 @@ Examples # logging vrf vrf03 source-interface Vlan100 # test(config)# - - name: Delete all logging configs - arista.eos.eos_logging_global: - state: deleted - become: yes + - name: Delete all logging configs + arista.eos.eos_logging_global: + state: deleted + become: true # After state: # test(config)#show running-config | section logging @@ -1628,10 +1627,10 @@ Examples # ! # logging level AAA alerts - - name: parse configs - arista.eos.eos_logging_global: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed + - name: parse configs + arista.eos.eos_logging_global: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed # Module Execution # "parsed": { @@ -1702,9 +1701,9 @@ Examples # logging level AAA alerts # test(config)# - - name: gather configs - arista.eos.eos_logging_global: - state: gathered + - name: gather configs + arista.eos.eos_logging_global: + state: gathered # Module Execution: # "gathered": { @@ -1761,35 +1760,35 @@ Examples # # Using rendered: - - name: Render provided configuration - arista.eos.eos_logging_global: - config: - format: - timestamp: - traditional: - timezone: True - level: - facility: "AAA" - severity: "alerts" - persistent: - size: 4096 - policy: - invert_result: True - match_list: "list01" - hosts: - - name: "host01" - protocol: "tcp" - - name: "11.11.11.1" - port: 25 - vrfs: - - name: "vrf01" - source_interface: "Ethernet1" - - name: "vrf02" - hosts: - - name: "hostvrf1" - protocol: "tcp" - - name: "24.1.1.1" - port: "33" + - name: Render provided configuration + arista.eos.eos_logging_global: + config: + format: + timestamp: + traditional: + timezone: true + level: + facility: "AAA" + severity: "alerts" + persistent: + size: 4096 + policy: + invert_result: true + match_list: "list01" + hosts: + - name: "host01" + protocol: "tcp" + - name: "11.11.11.1" + port: 25 + vrfs: + - name: "vrf01" + source_interface: "Ethernet1" + - name: "vrf02" + hosts: + - name: "hostvrf1" + protocol: "tcp" + - name: "24.1.1.1" + port: "33" # Module Execution: # "rendered": [ diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_logging_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_logging_module.rst index bcdb50a43..77c3b9ed4 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_logging_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_logging_module.rst @@ -335,8 +335,8 @@ Examples - name: Configure logging using aggregate arista.eos.eos_logging: aggregate: - - {dest: console, level: warnings} - - {dest: buffered, size: 480000} + - {dest: console, level: warnings} + - {dest: buffered, size: 480000} state: present diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_ntp_global_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_ntp_global_module.rst index eea1b5e73..4b69c8163 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_ntp_global_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_ntp_global_module.rst @@ -687,47 +687,47 @@ Examples # Using merged - # Before state - + # Before state: + # ------------- # localhost(config)#show running-config | section ntp # localhost(config)# - - name: Merge provided configuration with device configuration - arista.eos.eos_ntp_global: - config: - authenticate: - enable: true - authentication_keys: - - id: 2 - algorithm: "sha1" - encryption: 7 - key: "123456" - - id: 23 - algorithm: "md5" - encryption: 7 - key: "123456" - local_interface: "Ethernet1" - qos_dscp: 10 - trusted_key: 23 - servers: - - server: "10.1.1.1" - vrf: "vrf01" - burst: True - prefer: True - - server: "25.1.1.1" - vrf: "vrf01" - maxpoll: 15 - key_id: 2 - serve: - access_lists: - - afi: "ip" - acls: - - acl_name: "acl01" - direction: "in" - - afi: "ipv6" - acls: - - acl_name: "acl02" - direction: "in" + - name: Merge provided configuration with device configuration + arista.eos.eos_ntp_global: + config: + authenticate: + enable: true + authentication_keys: + - id: 2 + algorithm: "sha1" + encryption: 7 + key: "123456" + - id: 23 + algorithm: "md5" + encryption: 7 + key: "123456" + local_interface: "Ethernet1" + qos_dscp: 10 + trusted_key: 23 + servers: + - server: "10.1.1.1" + vrf: "vrf01" + burst: true + prefer: true + - server: "25.1.1.1" + vrf: "vrf01" + maxpoll: 15 + key_id: 2 + serve: + access_lists: + - afi: "ip" + acls: + - acl_name: "acl01" + direction: "in" + - afi: "ipv6" + acls: + - acl_name: "acl02" + direction: "in" # After State @@ -836,28 +836,29 @@ Examples # ntp serve ipv6 access-group acl02 in # localhost(config)# - - name: Replace - arista.eos.eos_ntp_global: - config: - qos_dscp: 15 - authentication_keys: - - id: 2 - algorithm: "md5" - encryption: 7 - key: "123456" - servers: - - server: "11.21.1.1" - vrf: "vrf01" - burst: True - prefer: True - minpoll: 13 - serve: - access_lists: - - afi: "ip" - acls: - - acl_name: "acl03" - direction: "in" - state: replaced + - name: Replace + arista.eos.eos_ntp_global: + config: + qos_dscp: 15 + authentication_keys: + - id: 2 + algorithm: "md5" + encryption: 7 + key: "123456" + servers: + - server: "11.21.1.1" + vrf: "vrf01" + burst: true + prefer: true + minpoll: 13 + serve: + access_lists: + - afi: "ip" + acls: + - acl_name: "acl03" + direction: "in" + state: replaced + # After State: # localhost(config)#show running-config | section ntp # ntp authentication-key 2 md5 7 123456 @@ -992,28 +993,29 @@ Examples # ntp serve ipv6 access-group acl02 in # localhost(config)# - - name: Replace - arista.eos.eos_ntp_global: - config: - qos_dscp: 15 - authentication_keys: - - id: 2 - algorithm: "md5" - encryption: 7 - key: "123456" - servers: - - server: "11.21.1.1" - vrf: "vrf01" - burst: True - prefer: True - minpoll: 13 - serve: - access_lists: - - afi: "ip" - acls: - - acl_name: "acl03" - direction: "in" - state: overridden + - name: Replace + arista.eos.eos_ntp_global: + config: + qos_dscp: 15 + authentication_keys: + - id: 2 + algorithm: "md5" + encryption: 7 + key: "123456" + servers: + - server: "11.21.1.1" + vrf: "vrf01" + burst: true + prefer: true + minpoll: 13 + serve: + access_lists: + - afi: "ip" + acls: + - acl_name: "acl03" + direction: "in" + state: overridden + # After State: # localhost(config)#show running-config | section ntp # ntp authentication-key 2 md5 7 123456 @@ -1149,9 +1151,9 @@ Examples # ntp serve ipv6 access-group acl02 in # localhost(config)# - - name: Delete ntp-global - arista.eos.eos_ntp_global: - state: deleted + - name: Delete ntp-global + arista.eos.eos_ntp_global: + state: deleted # After State: # localhost(config)#show running-config | section ntp @@ -1255,12 +1257,13 @@ Examples # ntp serve ip access-group acl01 in # ntp serve ipv6 access-group acl02 in - - name: parse configs - arista.eos.eos_ntp_global: - running_config: "{{ lookup('file', './parsed_ntp_global.cfg') }}" - state: parsed - tags: - - parsed + - name: parse configs + arista.eos.eos_ntp_global: + running_config: "{{ lookup('file', './parsed_ntp_global.cfg') }}" + state: parsed + tags: + - parsed + # Module Execution # "parsed": { # "authenticate": { @@ -1344,13 +1347,14 @@ Examples # ntp serve ipv6 access-group acl02 in # localhost(config)# + - name: gather configs + arista.eos.eos_ntp_global: + state: gathered + tags: + - gathered - - name: gather configs - arista.eos.eos_ntp_global: - state: gathered - tags: - - gathered # Module Execution + # "gathered": { # "authenticate": { # "enable": true @@ -1418,47 +1422,45 @@ Examples # } # } - # using rendered: - - name: Render provided configuration - arista.eos.eos_ntp_global: - config: - authenticate: - enable: true - authentication_keys: - - id: 2 - algorithm: "sha1" - encryption: 7 - key: "123456" - - id: 23 - algorithm: "md5" - encryption: 7 - key: "123456" - local_interface: "Ethernet1" - qos_dscp: 10 - trusted_key: 23 - servers: - - server: "10.1.1.1" - vrf: "vrf01" - burst: True - prefer: True - - server: "25.1.1.1" - vrf: "vrf01" - maxpoll: 15 - key_id: 2 - serve: - access_lists: - - afi: "ip" - acls: - - acl_name: "acl01" - direction: "in" - - afi: "ipv6" - acls: - - acl_name: "acl02" - direction: "in" - state: rendered - become: yes + - name: Render provided configuration + arista.eos.eos_ntp_global: + config: + authenticate: + enable: true + authentication_keys: + - id: 2 + algorithm: "sha1" + encryption: 7 + key: "123456" + - id: 23 + algorithm: "md5" + encryption: 7 + key: "123456" + local_interface: "Ethernet1" + qos_dscp: 10 + trusted_key: 23 + servers: + - server: "10.1.1.1" + vrf: "vrf01" + burst: true + prefer: true + - server: "25.1.1.1" + vrf: "vrf01" + maxpoll: 15 + key_id: 2 + serve: + access_lists: + - afi: "ip" + acls: + - acl_name: "acl01" + direction: "in" + - afi: "ipv6" + acls: + - acl_name: "acl02" + direction: "in" + state: rendered # Module Execution: # "rendered": [ diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_ospf_interfaces_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_ospf_interfaces_module.rst index 52844cc67..10f624c96 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_ospf_interfaces_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_ospf_interfaces_module.rst @@ -749,7 +749,7 @@ Parameters </ul> </td> <td> - <div>if True, Disable MTU check for Database Description packets.</div> + <div>if true, Disable MTU check for Database Description packets.</div> </td> </tr> <tr> @@ -938,7 +938,7 @@ Parameters </ul> </td> <td> - <div>if True, Disable MTU check for Database Description packets.</div> + <div>if true, Disable MTU check for Database Description packets.</div> </td> </tr> <tr> @@ -1124,31 +1124,59 @@ Examples # Using merged - # Before state - + # Before state: + # ------------- # veos(config)#show running-config | section interface | ospf # veos(config)# - - name: Merge provided configuration with device configuration - arista.eos.eos_ospf_interfaces: - config: - - name: "Vlan1" - address_family: - - afi: "ipv4" - area: - area_id: "0.0.0.50" - cost: 500 - mtu_ignore: True - - afi: "ipv6" - dead_interval: 44 - ip_params: - - afi: "ipv6" - mtu_ignore: True - network: "point-to-point" - state: merged - - # After State - + - name: Merge provided configuration with device configuration + arista.eos.eos_ospf_interfaces: + config: + - name: "Vlan1" + address_family: + - afi: "ipv4" + area: + area_id: "0.0.0.50" + cost: 500 + mtu_ignore: true + - afi: "ipv6" + dead_interval: 44 + ip_params: + - afi: "ipv6" + mtu_ignore: true + network: "point-to-point" + state: merged + + # Task output: + # ------------ + # before: [] + # + # commands: + # - interface Vlan1 + # - ip ospf area 0.0.0.50 + # - ip ospf cost 500 + # - ip ospf mtu-ignore + # - ospfv3 dead-interval 44 + # - ospfv3 ipv6 mtu-ignore + # - ospfv3 ipv6 network point-to-point + # + # after: + # - address_family: + # - afi: ipv4 + # area: + # area_id: 0.0.0.50 + # cost: 500 + # mtu_ignore: true + # - afi: ipv6 + # dead_interval: 44 + # ip_params: + # - afi: ipv6 + # mtu_ignore: true + # network: point-to-point + # name: Vlan1 + + # After state: + # ------------ # veos(config)#show running-config | section interface | ospf # interface Vlan1 # ip ospf cost 500 @@ -1157,74 +1185,11 @@ Examples # ospfv3 dead-interval 44 # ospfv3 ipv6 network point-to-point # ospfv3 ipv6 mtu-ignore - # veos(config)# - # - # - # Module Execution: - # - # "after": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.50" - # }, - # "cost": 500, - # "mtu_ignore": True - # }, - # { - # "afi": "ipv6", - # "dead_interval": 44, - # "ip_params": [ - # { - # "afi": "ipv6", - # "mtu_ignore": True, - # "network": "point-to-point" - # } - # ] - # } - # ], - # "name": "Vlan1" - # } - # ], - # "before": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # } - # ], - # "changed": True, - # "commands": [ - # "interface Vlan1", - # "ip ospf area 0.0.0.50", - # "ip ospf cost 500", - # "ip ospf mtu-ignore", - # "ospfv3 dead-interval 44", - # "ospfv3 ipv6 mtu-ignore", - # "ospfv3 ipv6 network point-to-point" - # ], - # # Using replaced - #--------------- - - # Before State: + # Before state: + # ------------- # veos(config)#show running-config | section interface | ospf # interface Vlan1 # ip ospf cost 500 @@ -1247,26 +1212,100 @@ Examples # ospfv3 ipv4 hello-interval 45 # ospfv3 ipv4 retransmit-interval 100 # ospfv3 ipv4 area 0.0.0.6 - # veos(config)# - - - - name: Replace device configuration with provided configuration - arista.eos.eos_ospf_interfaces: - config: - - name: "Vlan1" - address_family: - - afi: "ipv6" - cost: 44 - bfd: True - ip_params: - - afi: "ipv6" - mtu_ignore: True - network: "point-to-point" - dead_interval: 56 - state: replaced - - # After State: + - name: Replace device configuration with provided configuration + arista.eos.eos_ospf_interfaces: + config: + - name: "Vlan1" + address_family: + - afi: "ipv6" + cost: 44 + bfd: true + ip_params: + - afi: "ipv6" + mtu_ignore: true + network: "point-to-point" + dead_interval: 56 + state: replaced + + # Task output: + # ------------ + # before: + # - address_family: + # - afi: ipv4 + # area: + # area_id: 0.0.0.50 + # cost: 500 + # dead_interval: 29 + # hello_interval: 66 + # mtu_ignore: true + # - afi: ipv6 + # cost: 106 + # dead_interval: 44 + # hello_interval: 77 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.5 + # priority: 45 + # - afi: ipv6 + # mtu_ignore: true + # network: point-to-point + # passive_interface: true + # retransmit_interval: 115 + # transmit_delay: 100 + # name: Vlan1 + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 + # + # commands: + # - interface Vlan1 + # - no ip ospf cost 500 + # - no ip ospf dead-interval 29 + # - no ip ospf hello-interval 66 + # - no ip ospf mtu-ignore + # - no ip ospf area 0.0.0.50 + # - ospfv3 cost 44 + # - ospfv3 bfd + # - ospfv3 authentication ipsec spi 30 md5 passphrase 7 7hl8FV3lZ6H1mAKpjL47hQ== + # - no ospfv3 ipv4 priority 45 + # - no ospfv3 ipv4 area 0.0.0.5 + # - ospfv3 ipv6 dead-interval 56 + # - no ospfv3 ipv6 passive-interface + # - no ospfv3 ipv6 retransmit-interval 115 + # - no ospfv3 hello-interval 77 + # - no ospfv3 dead-interval 44 + # - no ospfv3 transmit-delay 100 + # + # after: + # - address_family: + # - afi: ipv6 + # bfd: true + # cost: 44 + # ip_params: + # - afi: ipv6 + # mtu_ignore: true + # network: point-to-point + # name: Vlan1 + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 + + # After state: + # ------------ # veos(config)#show running-config | section interface | ospf # interface Vlan1 # ospfv3 bfd @@ -1279,149 +1318,11 @@ Examples # ospfv3 ipv4 hello-interval 45 # ospfv3 ipv4 retransmit-interval 100 # ospfv3 ipv4 area 0.0.0.6 - # veos(config)# - # - # Module Execution: - # - # "after": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "bfd": True, - # "cost": 44, - # "ip_params": [ - # { - # "afi": "ipv6", - # "mtu_ignore": True, - # "network": "point-to-point" - # } - # ] - # } - # ], - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ], - # "before": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.50" - # }, - # "cost": 500, - # "dead_interval": 29, - # "hello_interval": 66, - # "mtu_ignore": True - # }, - # { - # "afi": "ipv6", - # "cost": 106, - # "dead_interval": 44, - # "hello_interval": 77, - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.5" - # }, - # "priority": 45 - # }, - # { - # "afi": "ipv6", - # "mtu_ignore": True, - # "network": "point-to-point", - # "passive_interface": True, - # "retransmit_interval": 115 - # } - # ], - # "transmit_delay": 100 - # } - # ], - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ], - # "changed": True, - # "commands": [ - # "interface Vlan1", - # "no ip ospf cost 500", - # "no ip ospf dead-interval 29", - # "no ip ospf hello-interval 66", - # "no ip ospf mtu-ignore", - # "no ip ospf area 0.0.0.50", - # "ospfv3 cost 44", - # "ospfv3 bfd", - # "ospfv3 authentication ipsec spi 30 md5 passphrase 7 7hl8FV3lZ6H1mAKpjL47hQ==", - # "no ospfv3 ipv4 priority 45", - # "no ospfv3 ipv4 area 0.0.0.5", - # "ospfv3 ipv6 dead-interval 56", - # "no ospfv3 ipv6 passive-interface", - # "no ospfv3 ipv6 retransmit-interval 115", - # "no ospfv3 hello-interval 77", - # "no ospfv3 dead-interval 44", - # "no ospfv3 transmit-delay 100" - # ], - # - # Using overidden: - # ---------------- + # Using overidden - # Before State: + # Before state: + # ------------- # veos(config)#show running-config | section interface | ospf # interface Vlan1 # ip ospf dead-interval 29 @@ -1443,25 +1344,89 @@ Examples # ospfv3 ipv4 hello-interval 45 # ospfv3 ipv4 retransmit-interval 100 # ospfv3 ipv4 area 0.0.0.6 - # veos(config)# - - - name: Override device configuration with provided configuration - arista.eos.eos_ospf_interfaces: - config: - - name: "Vlan1" - address_family: - - afi: "ipv6" - cost: 44 - bfd: True - ip_params: - - afi: "ipv6" - mtu_ignore: True - network: "point-to-point" - dead_interval: 56 - state: overridden - - # After State: + - name: Override device configuration with provided configuration + arista.eos.eos_ospf_interfaces: + config: + - name: "Vlan1" + address_family: + - afi: "ipv6" + cost: 44 + bfd: true + ip_params: + - afi: "ipv6" + mtu_ignore: true + network: "point-to-point" + dead_interval: 56 + state: overridden + + # Task output: + # ------------ + # before: + # - address_family: + # - afi: ipv4 + # dead_interval: 29 + # hello_interval: 66 + # mtu_ignore: true + # - afi: ipv6 + # bfd: true + # cost: 106 + # hello_interval: 77 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.5 + # priority: 45 + # - afi: ipv6 + # dead_interval: 56 + # mtu_ignore: true + # network: point-to-point + # passive_interface: true + # retransmit_interval: 115 + # transmit_delay: 100 + # name: Vlan1 + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 + # + # commands: + # - interface Vlan2 + # - no ospfv3 ipv4 hello-interval 45 + # - no ospfv3 ipv4 retransmit-interval 100 + # - no ospfv3 ipv4 area 0.0.0.6 + # - interface Vlan1 + # - no ip ospf dead-interval 29 + # - no ip ospf hello-interval 66 + # - no ip ospf mtu-ignore + # - ospfv3 cost 44 + # - ospfv3 authentication ipsec spi 30 md5 passphrase 7 7hl8FV3lZ6H1mAKpjL47hQ== + # - no ospfv3 ipv4 priority 45 + # - no ospfv3 ipv4 area 0.0.0.5 + # - no ospfv3 ipv6 passive-interface + # - no ospfv3 ipv6 retransmit-interval 115 + # - no ospfv3 hello-interval 77 + # - no ospfv3 transmit-delay 100 + # + # after: + # - address_family: + # - afi: ipv6 + # bfd: true + # cost: 44 + # ip_params: + # - afi: ipv6 + # dead_interval: 56 + # mtu_ignore: true + # network: point-to-point + # name: Vlan1 + + # After state: + # ------------ # veos(config)#show running-config | section interface | ospf # interface Vlan1 # ospfv3 bfd @@ -1470,133 +1435,11 @@ Examples # ospfv3 ipv6 dead-interval 56 # ospfv3 ipv6 network point-to-point # ospfv3 ipv6 mtu-ignore - # veos(config)# - # - # - # Module Execution: - # - # "after": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "bfd": True, - # "cost": 44, - # "ip_params": [ - # { - # "afi": "ipv6", - # "dead_interval": 56, - # "mtu_ignore": True, - # "network": "point-to-point" - # } - # ] - # } - # ], - # "name": "Vlan1" - # }, - # { - # "name": "Vlan2" - # } - # ], - # "before": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "dead_interval": 29, - # "hello_interval": 66, - # "mtu_ignore": True - # }, - # { - # "afi": "ipv6", - # "bfd": True, - # "cost": 106, - # "hello_interval": 77, - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.5" - # }, - # "priority": 45 - # }, - # { - # "afi": "ipv6", - # "dead_interval": 56, - # "mtu_ignore": True, - # "network": "point-to-point", - # "passive_interface": True, - # "retransmit_interval": 115 - # } - # ], - # "transmit_delay": 100 - # } - # ], - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ], - # "changed": True, - # "commands": [ - # "interface Vlan2", - # "no ospfv3 ipv4 hello-interval 45", - # "no ospfv3 ipv4 retransmit-interval 100", - # "no ospfv3 ipv4 area 0.0.0.6", - # "interface Vlan1", - # "no ip ospf dead-interval 29", - # "no ip ospf hello-interval 66", - # "no ip ospf mtu-ignore", - # "ospfv3 cost 44", - # "ospfv3 authentication ipsec spi 30 md5 passphrase 7 7hl8FV3lZ6H1mAKpjL47hQ==", - # "no ospfv3 ipv4 priority 45", - # "no ospfv3 ipv4 area 0.0.0.5", - # "no ospfv3 ipv6 passive-interface", - # "no ospfv3 ipv6 retransmit-interval 115", - # "no ospfv3 hello-interval 77", - # "no ospfv3 transmit-delay 100" - # ], - # - # Using deleted: - #-------------- - - # before State: + # Using deleted + # Before state: + # ------------- # veos(config)#show running-config | section interface | ospf # interface Vlan1 # ip ospf dead-interval 29 @@ -1618,146 +1461,88 @@ Examples # ospfv3 ipv4 hello-interval 45 # ospfv3 ipv4 retransmit-interval 100 # ospfv3 ipv4 area 0.0.0.6 - # veos(config)# - - name: Delete device configuration - arista.eos.eos_ospf_interfaces: - config: - - name: "Vlan1" - state: deleted - - # After State: + - name: Delete provided ospf interface config + arista.eos.eos_ospf_interfaces: + config: + - name: "Vlan1" + state: deleted + # Task output: + # ------------ + # before: + # - address_family: + # - afi: ipv4 + # dead_interval: 29 + # hello_interval: 66 + # mtu_ignore: true + # - afi: ipv6 + # bfd: true + # cost: 106 + # hello_interval: 77 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.5 + # priority: 45 + # - afi: ipv6 + # dead_interval: 56 + # mtu_ignore: true + # network: point-to-point + # passive_interface: true + # retransmit_interval: 115 + # transmit_delay: 100 + # name: Vlan1 + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 + + # commands: + # - interface Vlan1 + # - no ip ospf dead-interval 29 + # - no ip ospf hello-interval 66 + # - no ip ospf mtu-ignore + # - no ospfv3 bfd + # - no ospfv3 cost 106 + # - no ospfv3 hello-interval 77 + # - no ospfv3 transmit-delay 100 + # - no ospfv3 ipv4 priority 45 + # - no ospfv3 ipv4 area 0.0.0.5 + # - no ospfv3 ipv6 passive-interface + # - no ospfv3 ipv6 dead-interval 56 + # - no ospfv3 ipv6 retransmit-interval 115 + # - no ospfv3 ipv6 network point-to-point + # - no ospfv3 ipv6 mtu-ignore + # + # after: + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 + + # After state: + # ------------ # veos#show running-config | section interface | ospf # interface Vlan2 # ospfv3 ipv4 hello-interval 45 # ospfv3 ipv4 retransmit-interval 100 # ospfv3 ipv4 area 0.0.0.6 - # - # Module Execution: - # - # "after": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ], - # "before": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "dead_interval": 29, - # "hello_interval": 66, - # "mtu_ignore": True - # }, - # { - # "afi": "ipv6", - # "bfd": True, - # "cost": 106, - # "hello_interval": 77, - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.5" - # }, - # "priority": 45 - # }, - # { - # "afi": "ipv6", - # "dead_interval": 56, - # "mtu_ignore": True, - # "network": "point-to-point", - # "passive_interface": True, - # "retransmit_interval": 115 - # } - # ], - # "transmit_delay": 100 - # } - # ], - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ], - # "changed": True, - # "commands": [ - # "interface Vlan1", - # "no ip ospf dead-interval 29", - # "no ip ospf hello-interval 66", - # "no ip ospf mtu-ignore", - # "no ospfv3 bfd", - # "no ospfv3 cost 106", - # "no ospfv3 hello-interval 77", - # "no ospfv3 transmit-delay 100", - # "no ospfv3 ipv4 priority 45", - # "no ospfv3 ipv4 area 0.0.0.5", - # "no ospfv3 ipv6 passive-interface", - # "no ospfv3 ipv6 dead-interval 56", - # "no ospfv3 ipv6 retransmit-interval 115", - # "no ospfv3 ipv6 network point-to-point", - # "no ospfv3 ipv6 mtu-ignore" - # ], - # - # Using parsed: - # ------------ + # Using parsed - # parsed.cfg: + # parsed.cfg # ---------- - # interface Vlan1 # ip ospf dead-interval 29 # ip ospf hello-interval 66 @@ -1781,73 +1566,50 @@ Examples # ospfv3 ipv4 area 0.0.0.6 # - - name: parse configs - arista.eos.eos_ospf_interfaces: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed - - # Module Execution: - # "parsed": [ - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "cost": 500, - # "dead_interval": 29, - # "hello_interval": 66, - # "mtu_ignore": True - # }, - # { - # "afi": "ipv6", - # "bfd": True, - # "cost": 106, - # "hello_interval": 77, - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.5" - # }, - # "priority": 45 - # }, - # { - # "afi": "ipv6", - # "dead_interval": 56, - # "mtu_ignore": True, - # "network": "point-to-point", - # "passive_interface": True, - # "retransmit_interval": 115 - # } - # ], - # "transmit_delay": 100 - # } - # ], - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ] + - name: parse provided config into structured facts + arista.eos.eos_ospf_interfaces: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed - # Using gathered: + # Task output: + # ------------ + # parsed: + # - address_family: + # - afi: ipv4 + # cost: 500 + # dead_interval: 29 + # hello_interval: 66 + # mtu_ignore: true + # - afi: ipv6 + # bfd: true + # cost: 106 + # hello_interval: 77 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.5 + # priority: 45 + # - afi: ipv6 + # dead_interval: 56 + # mtu_ignore: true + # network: point-to-point + # passive_interface: true + # retransmit_interval: 115 + # transmit_delay: 100 + # name: Vlan1 + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 - # Device COnfig: + # Using gathered: + # Device config: # veos#show running-config | section interface | ospf # interface Vlan1 # ip ospf cost 500 @@ -1870,150 +1632,228 @@ Examples # ospfv3 ipv4 hello-interval 45 # ospfv3 ipv4 retransmit-interval 100 # ospfv3 ipv4 area 0.0.0.6 - # veos# - - name: gather configs - arista.eos.eos_ospf_interfaces: - state: gathered + - name: gather runnig config + arista.eos.eos_ospf_interfaces: + state: gathered - # Module Execution: - # - # "gathered": [ - # { - # "name": "Ethernet1" - # }, - # { - # "name": "Ethernet2" - # }, - # { - # "name": "Management1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.50" - # }, - # "cost": 500, - # "dead_interval": 29, - # "hello_interval": 66, - # "mtu_ignore": True - # }, - # { - # "afi": "ipv6", - # "cost": 106, - # "hello_interval": 77, - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.5" - # }, - # "priority": 45 - # }, - # { - # "afi": "ipv6", - # "dead_interval": 56, - # "mtu_ignore": True, - # "network": "point-to-point", - # "passive_interface": True, - # "retransmit_interval": 115 - # } - # ], - # "transmit_delay": 100 - # } - # ], - # "name": "Vlan1" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "ip_params": [ - # { - # "afi": "ipv4", - # "area": { - # "area_id": "0.0.0.6" - # }, - # "hello_interval": 45, - # "retransmit_interval": 100 - # } - # ] - # } - # ], - # "name": "Vlan2" - # } - # ], - # - - - # Using rendered: - # -------------- - - - name: Render provided configuration - arista.eos.eos_ospf_interfaces: - config: - - name: "Vlan1" - address_family: - - afi: "ipv4" - dead_interval: 29 - mtu_ignore: True - hello_interval: 66 - - afi: "ipv6" - hello_interval: 77 - cost : 106 - transmit_delay: 100 - ip_params: - - afi: "ipv6" - retransmit_interval: 115 - dead_interval: 56 - passive_interface: True - - afi: "ipv4" - area: - area_id: "0.0.0.5" - priority: 45 - - name: "Vlan2" - address_family: - - afi: "ipv6" - ip_params: - - afi: "ipv4" - area: - area_id: "0.0.0.6" - hello_interval: 45 - retransmit_interval: 100 - - afi: "ipv4" - message_digest_key: - key_id: 200 - encryption: 7 - key: "hkdfhtu==" - - state: rendered - - # Module Execution: - # - # "rendered": [ - # "interface Vlan1", - # "ip ospf dead-interval 29", - # "ip ospf mtu-ignore", - # "ip ospf hello-interval 66", - # "ospfv3 hello-interval 77", - # "ospfv3 cost 106", - # "ospfv3 transmit-delay 100", - # "ospfv3 ipv4 area 0.0.0.5", - # "ospfv3 ipv4 priority 45", - # "ospfv3 ipv6 retransmit-interval 115", - # "ospfv3 ipv6 dead-interval 56", - # "ospfv3 ipv6 passive-interface", - # "interface Vlan2", - # "ip ospf message-digest-key 200 md5 7 hkdfhtu==", - # "ospfv3 ipv4 area 0.0.0.6", - # "ospfv3 ipv4 hello-interval 45", - # "ospfv3 ipv4 retransmit-interval 100" - # ] - # + # Task output: + # ------------ + # gathered: + # - address_family: + # - afi: ipv4 + # area: + # area_id: 0.0.0.50 + # cost: 500 + # dead_interval: 29 + # hello_interval: 66 + # mtu_ignore: true + # - afi: ipv6 + # cost: 106 + # hello_interval: 77 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.5 + # priority: 45 + # - afi: ipv6 + # dead_interval: 56 + # mtu_ignore: true + # network: point-to-point + # passive_interface: true + # retransmit_interval: 115 + # transmit_delay: 100 + # name: Vlan1 + # - address_family: + # - afi: ipv6 + # ip_params: + # - afi: ipv4 + # area: + # area_id: 0.0.0.6 + # hello_interval: 45 + # retransmit_interval: 100 + # name: Vlan2 + + # Using rendered + + - name: Render provided configuration + arista.eos.eos_ospf_interfaces: + config: + - name: "Vlan1" + address_family: + - afi: "ipv4" + dead_interval: 29 + mtu_ignore: true + hello_interval: 66 + - afi: "ipv6" + hello_interval: 77 + cost: 106 + transmit_delay: 100 + ip_params: + - afi: "ipv6" + retransmit_interval: 115 + dead_interval: 56 + passive_interface: true + - afi: "ipv4" + area: + area_id: "0.0.0.5" + priority: 45 + - name: "Vlan2" + address_family: + - afi: "ipv6" + ip_params: + - afi: "ipv4" + area: + area_id: "0.0.0.6" + hello_interval: 45 + retransmit_interval: 100 + - afi: "ipv4" + message_digest_key: + key_id: 200 + encryption: 7 + key: "hkdfhtu==" + + state: rendered + + # Task output: + # ------------ + # rendered: + # - interface Vlan1 + # - ip ospf dead-interval 29 + # - ip ospf mtu-ignore + # - ip ospf hello-interval 66 + # - ospfv3 hello-interval 77 + # - ospfv3 cost 106 + # - ospfv3 transmit-delay 100 + # - ospfv3 ipv4 area 0.0.0.5 + # - ospfv3 ipv4 priority 45 + # - ospfv3 ipv6 retransmit-interval 115 + # - ospfv3 ipv6 dead-interval 56 + # - ospfv3 ipv6 passive-interface + # - interface Vlan2 + # - ip ospf message-digest-key 200 md5 7 hkdfhtu== + # - ospfv3 ipv4 area 0.0.0.6 + # - ospfv3 ipv4 hello-interval 45 + # - ospfv3 ipv4 retransmit-interval 100 + + + +Return Values +------------- +Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: +.. raw:: html + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Key</th> + <th>Returned</th> + <th width="100%">Description</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>after</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when changed</td> + <td> + <div>The resulting configuration after module execution.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>before</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> + <td> + <div>The configuration prior to the module execution.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>commands</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> + <td> + <div>The set of commands pushed to the remote device.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Vlan1', 'ip ospf dead-interval 29', 'ip ospf mtu-ignore']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['interface Vlan1', 'ip ospf dead-interval 29', 'ip ospf mtu-ignore']</div> + </td> + </tr> + </table> + <br/><br/> Status diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv2_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv2_module.rst index 187a2985a..aa1a70975 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv2_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv2_module.rst @@ -1174,7 +1174,7 @@ Parameters </ul> </td> <td> - <div>If True, Disable dn-bit check for Type-3 LSAs in non-default VRFs.</div> + <div>If true, Disable dn-bit check for Type-3 LSAs in non-default VRFs.</div> </td> </tr> <tr> @@ -1270,7 +1270,7 @@ Parameters </ul> </td> <td> - <div>If True, Enable graceful restart helper.</div> + <div>If true, Enable graceful restart helper.</div> </td> </tr> <tr> @@ -1859,7 +1859,7 @@ Parameters </ul> </td> <td> - <div>If True, Set all interfaces to passive by default</div> + <div>If true, Set all interfaces to passive by default</div> </td> </tr> <tr> @@ -2708,82 +2708,168 @@ Examples # Using merged # Before state: - # ------------ + # ------------- # localhost#show running-config | section ospf # localhost# - - name: replace Ospf configs - arista.eos.eos_ospfv2: - config: - - processes: - - process_id: 1 - adjacency: - exchange_start: - threshold: 20045623 - areas: - - filter: - address: "10.1.1.0/24" - id: "0.0.0.2" - - id: "0.0.0.50" - range: - address: "172.20.0.0/16" - cost: 34 - default_information: - metric: 100 - metric_type: 1 - originate: True - distance: - intra_area: 85 - max_lsa: - count: 8000 - ignore_count: 3 - ignore_time: 6 - reset_time: 20 - threshold: 40 - networks: - - area: "0.0.0.0" - prefix: 10.10.2.0/24 - - area: "0.0.0.0" - prefix: "10.10.3.0/24" - redistribute: - - routes: "static" - router_id: "170.21.0.4" - - process_id: 2 - vrf: "vrf01" - areas: - - id: "0.0.0.9" - default_cost: 20 - max_lsa: - count: 8000 - ignore_count: 3 - ignore_time: 6 - reset_time: 20 - threshold: 40 - networks: - - area: "0.0.0.0" - prefix: 10.10.2.0/24 - - area: "0.0.0.0" - prefix: "10.10.3.0/24" - redistribute: - - routes: "static" - router_id: "170.21.0.4" - - process_id: 2 - vrf: "vrf01" - areas: - - id: "0.0.0.9" - default_cost: 20 - max_lsa: - count: 8000 - ignore_count: 3 - ignore_time: 6 - reset_time: 20 - threshold: 40 - - process_id: 3 - vrf: "vrf02" - redistribute: - - routes: "connected" + - name: Merge provided config into running config + arista.eos.eos_ospfv2: + config: + - processes: + - process_id: 1 + adjacency: + exchange_start: + threshold: 20045623 + areas: + - filter: + address: "10.1.1.0/24" + id: "0.0.0.2" + - id: "0.0.0.50" + range: + address: "172.20.0.0/16" + cost: 34 + default_information: + metric: 100 + metric_type: 1 + originate: true + distance: + intra_area: 85 + max_lsa: + count: 8000 + ignore_count: 3 + ignore_time: 6 + reset_time: 20 + threshold: 40 + networks: + - area: "0.0.0.0" + prefix: 10.10.2.0/24 + - area: "0.0.0.0" + prefix: "10.10.3.0/24" + redistribute: + - routes: "static" + router_id: "170.21.0.4" + - process_id: 2 + vrf: "vrf01" + areas: + - id: "0.0.0.9" + default_cost: 20 + max_lsa: + count: 8000 + ignore_count: 3 + ignore_time: 6 + reset_time: 20 + threshold: 40 + networks: + - area: "0.0.0.0" + prefix: 10.10.2.0/24 + - area: "0.0.0.0" + prefix: "10.10.3.0/24" + redistribute: + - routes: "static" + router_id: "170.21.0.4" + - process_id: 2 + vrf: "vrf01" + areas: + - id: "0.0.0.9" + default_cost: 20 + max_lsa: + count: 8000 + ignore_count: 3 + ignore_time: 6 + reset_time: 20 + threshold: 40 + - process_id: 3 + vrf: "vrf02" + redistribute: + - routes: "connected" + + # Task output: + # ------------ + # before: {} + + # commands + # - router ospf 1 + # - adjacency exchange-start threshold 20045623 + # - area 0.0.0.2 filter 10.1.1.0/24 + # - area 0.0.0.50 range 172.20.0.0/16 cost 34 + # - default-information originate metric 100 metric-type 1 + # - distance ospf intra-area 85 + # - max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20 + # - network 10.10.2.0/24 area 0.0.0.0 + # - network 10.10.3.0/24 area 0.0.0.0 + # - redistribute static + # - router-id 170.21.0.4 + # - exit + # - router ospf 2 vrf vrf01 + # - area 0.0.0.9 default-cost 20 + # - max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20 + # - network 10.10.2.0/24 area 0.0.0.0 + # - network 10.10.3.0/24 area 0.0.0.0 + # - redistribute static + # - router-id 170.21.0.4 + # - exit + # - router ospf 2 vrf vrf01 + # - area 0.0.0.9 default-cost 20 + # - max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20 + # - exit + # - router ospf 3 vrf vrf02 + # - redistribute connected + # - exit + # + # after: + # processes: + # - adjacency: + # exchange_start: + # threshold: 20045623 + # areas: + # - area_id: 0.0.0.2 + # filter: + # address: 10.1.1.0/24 + # - area_id: 0.0.0.50 + # range: + # address: 172.20.0.0/16 + # cost: 34 + # default_information: + # metric: 100 + # metric_type: 1 + # originate: true + # distance: + # intra_area: 85 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # networks: + # - area: 0.0.0.0 + # prefix: 10.10.2.0/24 + # - area: 0.0.0.0 + # prefix: 10.10.3.0/24 + # process_id: 1 + # redistribute: + # - routes: static + # router_id: 170.21.0.4 + # - areas: + # - area_id: 0.0.0.9 + # default_cost: 20 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # process_id: 2 + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 # After state: + # ------------ # localhost#show running-config | section ospf # router ospf 1 # router-id 170.21.0.4 @@ -2804,103 +2890,11 @@ Examples # router ospf 3 vrf vrf02 # redistribute connected # max-lsa 12000 - # localhost# - # - # "processes": [ - # { - # "adjacency": { - # "exchange_start": { - # "threshold": 20045623 - # } - # }, - # "areas": [ - # { - # "filter": { - # "address": "10.1.1.0/24" - # }, - # "id": "0.0.0.2" - # }, - # { - # "id": "0.0.0.50", - # "range": { - # "address": "172.20.0.0/16", - # "cost": 34 - # } - # } - # ], - # "default_information": { - # "metric": 100, - # "metric_type": 1, - # "originate": true - # }, - # "distance": { - # "intra_area": 85 - # }, - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "networks": [ - # { - # "area": "0.0.0.0", - # "prefix": "10.10.2.0/24" - # }, - # { - # "area": "0.0.0.0", - # "prefix": "10.10.3.0/24" - # } - # ], - # "process_id": 1, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "router_id": "170.21.0.4" - # }, - # { - # "areas": [ - # { - # "default_cost": 20, - # "id": "0.0.0.9" - # } - # ], - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "process_id": 2, - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - # - - # Using replaced: - # -------------- + # Using replaced # Before State: - + # ------------- # localhost#show running-config | section ospf # router ospf 1 # router-id 170.21.0.4 @@ -2921,210 +2915,155 @@ Examples # router ospf 3 vrf vrf02 # redistribute connected # max-lsa 12000 - # localhost# # - # "before": [ - # { - # "processes": [ - # { - # "adjacency": { - # "exchange_start": { - # "threshold": 20045623 - # } - # }, - # "areas": [ - # { - # "filter": { - # "address": "10.1.1.0/24" - # }, - # "id": "0.0.0.2" - # }, - # { - # "id": "0.0.0.50", - # "range": { - # "address": "172.20.0.0/16", - # "cost": 34 - # } - # } - # ], - # "default_information": { - # "metric": 100, - # "metric_type": 1, - # "originate": true - # }, - # "distance": { - # "intra_area": 85 - # }, - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "networks": [ - # { - # "area": "0.0.0.0", - # "prefix": "10.10.2.0/24" - # }, - # { - # "area": "0.0.0.0", - # "prefix": "10.10.3.0/24" - # } - # ], - # "process_id": 1, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "router_id": "170.21.0.4" - # }, - # { - # "areas": [ - # { - # "default_cost": 20, - # "id": "0.0.0.9" - # } - # ], - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "process_id": 2, - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - # - - name: replace Ospf configs - arista.eos.eos_ospfv2: - config: - - processes: - - process_id: 2 - vrf: "vrf01" - point_to_point: True - redistribute: - - routes: "isis" - isis_level: "level-1" - - state: replaced - - # After State: - # ----------- - # "router ospf 2 vrf vrf01", - # "no area 0.0.0.9 default-cost 20", - # "no max-lsa 8000 40 ignore-time 6 ignore-count 3 reset-time 20", - # "point-to-point routes", - # "redistribute isis level-1" + - name: replace Ospf configs + arista.eos.eos_ospfv2: + config: + - processes: + - process_id: 2 + vrf: "vrf01" + point_to_point: true + redistribute: + - routes: "isis" + isis_level: "level-1" + state: replaced + + # Task output: + # ------------ + # before: + # processes: + # - adjacency: + # exchange_start: + # threshold: 20045623 + # areas: + # - area_id: 0.0.0.2 + # filter: + # address: 10.1.1.0/24 + # - area_id: 0.0.0.50 + # range: + # address: 172.20.0.0/16 + # cost: 34 + # default_information: + # metric: 100 + # metric_type: 1 + # originate: true + # distance: + # intra_area: 85 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # networks: + # - area: 0.0.0.0 + # prefix: 10.10.2.0/24 + # - area: 0.0.0.0 + # prefix: 10.10.3.0/24 + # process_id: 1 + # redistribute: + # - routes: static + # router_id: 170.21.0.4 + # - areas: + # - area_id: 0.0.0.9 + # default_cost: 20 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # process_id: 2 + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 # - # "after": [ - # { - # "processes": [ - # { - # "adjacency": { - # "exchange_start": { - # "threshold": 20045623 - # } - # }, - # "areas": [ - # { - # "filter": { - # "address": "10.1.1.0/24" - # }, - # "id": "0.0.0.2" - # }, - # { - # "id": "0.0.0.50", - # "range": { - # "address": "172.20.0.0/16", - # "cost": 34 - # } - # } - # ], - # "default_information": { - # "metric": 100, - # "metric_type": 1, - # "originate": true - # }, - # "distance": { - # "intra_area": 85 - # }, - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "networks": [ - # { - # "area": "0.0.0.0", - # "prefix": "10.10.2.0/24" - # }, - # { - # "area": "0.0.0.0", - # "prefix": "10.10.3.0/24" - # } - # ], - # "process_id": 1, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "router_id": "170.21.0.4" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 2, - # "redistribute": [ - # { - # "isis_level": "level-1", - # "routes": "isis" - # } - # ], - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] + # commands: + # - router ospf 2 vrf vrf01 + # - no area 0.0.0.9 default-cost 20 + # - no max-lsa 8000 40 ignore-time 6 ignore-count 3 reset-time 20 + # - point-to-point routes + # - redistribute isis level-1 # + # after: + # processes: + # - adjacency: + # exchange_start: + # threshold: 20045623 + # areas: + # - area_id: 0.0.0.2 + # filter: + # address: 10.1.1.0/24 + # - area_id: 0.0.0.50 + # range: + # address: 172.20.0.0/16 + # cost: 34 + # default_information: + # metric: 100 + # metric_type: 1 + # originate: true + # distance: + # intra_area: 85 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # networks: + # - area: 0.0.0.0 + # prefix: 10.10.2.0/24 + # - area: 0.0.0.0 + # prefix: 10.10.3.0/24 + # process_id: 1 + # redistribute: + # - routes: static + # router_id: 170.21.0.4 + # - max_lsa: + # count: 12000 + # process_id: 2 + # redistribute: + # - isis_level: level-1 + # routes: isis + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 - # Using overridden: - # ---------------- + # After state: + # ------------ + # localhost#show running-config | section ospf + # router ospf 1 + # router-id 170.21.0.4 + # distance ospf intra-area 85 + # redistribute static + # area 0.0.0.2 filter 10.1.1.0/24 + # area 0.0.0.50 range 172.20.0.0/16 cost 34 + # network 10.10.2.0/24 area 0.0.0.0 + # network 10.10.3.0/24 area 0.0.0.0 + # max-lsa 8000 40 ignore-time 6 ignore-count 3 reset-time 20 + # adjacency exchange-start threshold 20045623 + # default-information originate metric 100 metric-type 1 + # ! + # router ospf 2 vrf vrf01 + # redistribute isis level-1 + # max-lsa 12000 + # ! + # router ospf 3 vrf vrf02 + # redistribute connected + # max-lsa 12000 - # Before State: + # Using overridden + + # Before state: + # ------------- # localhost#show running-config | section ospf # router ospf 1 # router-id 170.21.0.4 @@ -3145,135 +3084,98 @@ Examples # router ospf 3 vrf vrf02 # redistribute connected # max-lsa 12000 - # localhost# + + - name: override running config with provided config + arista.eos.eos_ospfv2: + config: + - processes: + - process_id: 2 + vrf: "vrf01" + redistribute: + - routes: "connected" + state: overriden + + # Task output: + # ------------ + + # before: + # processes: + # - adjacency: + # exchange_start: + # threshold: 20045623 + # areas: + # - area_id: 0.0.0.2 + # filter: + # address: 10.1.1.0/24 + # - area_id: 0.0.0.50 + # range: + # address: 172.20.0.0/16 + # cost: 34 + # default_information: + # metric: 100 + # metric_type: 1 + # originate: true + # distance: + # intra_area: 85 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # networks: + # - area: 0.0.0.0 + # prefix: 10.10.2.0/24 + # - area: 0.0.0.0 + # prefix: 10.10.3.0/24 + # process_id: 1 + # redistribute: + # - routes: static + # router_id: 170.21.0.4 + # - max_lsa: + # count: 12000 + # process_id: 2 + # redistribute: + # - isis_level: level-1 + # routes: isis + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 # - # "before": [ - # { - # "processes": [ - # { - # "adjacency": { - # "exchange_start": { - # "threshold": 20045623 - # } - # }, - # "areas": [ - # { - # "filter": { - # "address": "10.1.1.0/24" - # }, - # "id": "0.0.0.2" - # }, - # { - # "id": "0.0.0.50", - # "range": { - # "address": "172.20.0.0/16", - # "cost": 34 - # } - # } - # ], - # "default_information": { - # "metric": 100, - # "metric_type": 1, - # "originate": true - # }, - # "distance": { - # "intra_area": 85 - # }, - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "networks": [ - # { - # "area": "0.0.0.0", - # "prefix": "10.10.2.0/24" - # }, - # { - # "area": "0.0.0.0", - # "prefix": "10.10.3.0/24" - # } - # ], - # "process_id": 1, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "router_id": "170.21.0.4" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 2, - # "redistribute": [ - # { - # "isis_level": "level-1", - # "routes": "isis" - # } - # ], - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - - - name: override Ospf configs - arista.eos.eos_ospfv2: - config: - - processes: - - process_id: 2 - vrf: "vrf01" - redistribute: - - routes: "connected" - - state: override - - # After State: - - # "no router ospf 1", - # "no router ospf 3", - # "router ospf 2 vrf vrf01", - # "no max-lsa 12000", - # "no redistribute isis level-1", - # "redistribute connected" + # commands: + # - no router ospf 1 + # - no router ospf 3 + # - router ospf 2 vrf vrf01 + # - no max-lsa 12000 + # - no redistribute isis level-1 + # - redistribute connected # - # "after": [ - # { - # "processes": [ - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 2, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf01" - # } - # ] - # } - # ] - - # Using Deleted: + # after: + # processes: + # - max_lsa: + # count: 12000 + # process_id: 2 + # redistribute: + # - isis_level: level-1 + # routes: isis + # vrf: vrf01 + + # After state: + # ------------ + # localhost#show running-config | section ospf + # router ospf 2 vrf vrf01 + # redistribute isis level-1 + # max-lsa 12000 + # ! + + # Using deleted + # Before state: + # ------------- # localhost#show running-config | section ospf # router ospf 1 # router-id 170.21.0.4 @@ -3295,157 +3197,97 @@ Examples # router ospf 3 vrf vrf02 # redistribute connected # max-lsa 12000 - # localhost# # - # "before": [ - # { - # "processes": [ - # { - # "adjacency": { - # "exchange_start": { - # "threshold": 20045623 - # } - # }, - # "areas": [ - # { - # "filter": { - # "address": "10.1.1.0/24" - # }, - # "id": "0.0.0.2" - # }, - # { - # "id": "0.0.0.50", - # "range": { - # "address": "172.20.0.0/16", - # "cost": 34 - # } - # } - # ], - # "default_information": { - # "metric": 100, - # "metric_type": 1, - # "originate": true - # }, - # "distance": { - # "intra_area": 85 - # }, - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "networks": [ - # { - # "area": "0.0.0.0", - # "prefix": "10.10.2.0/24" - # }, - # { - # "area": "0.0.0.0", - # "prefix": "10.10.3.0/24" - # } - # ], - # "process_id": 1, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "router_id": "170.21.0.4" - # }, - # { - # "areas": [ - # { - # "default_cost": 20, - # "id": "0.0.0.9" - # } - # ], - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "process_id": 2, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - - - name: Delete Ospf configs - arista.eos.eos_ospfv2: - config: - - processes: - - process_id: 1 - - state: deleted - - # After State: - # Commands: - # "no router ospf 1" - - # "after": [ - # { - # "processes": [ - # { - # "areas": [ - # { - # "default_cost": 20, - # "id": "0.0.0.9" - # } - # ], - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "process_id": 2, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - - # Using gathered: + - name: Delete OSPF config + arista.eos.eos_ospfv2: + config: + processes: + - process_id: 1 + state: deleted + + # Task output: + # ------------ + # before: + # processes: + # - adjacency: + # exchange_start: + # threshold: 20045623 + # areas: + # - area_id: 0.0.0.2 + # filter: + # address: 10.1.1.0/24 + # - area_id: 0.0.0.50 + # range: + # address: 172.20.0.0/16 + # cost: 34 + # default_information: + # metric: 100 + # metric_type: 1 + # originate: true + # distance: + # intra_area: 85 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # networks: + # - area: 0.0.0.0 + # prefix: 10.10.2.0/24 + # - area: 0.0.0.0 + # prefix: 10.10.3.0/24 + # process_id: 1 + # redistribute: + # - routes: static + # router_id: 170.21.0.4 + # - areas: + # - area_id: 0.0.0.9 + # default_cost: 20 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # process_id: 2 + # redistribute: + # - routes: connected + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 + # + # commands: + # - no router ospf 1 + # + # after: + # processes: + # - areas: + # - area_id: 0.0.0.9 + # default_cost: 20 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # process_id: 2 + # redistribute: + # - routes: connected + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 + + # After state: + # ------------ # localhost#show running-config | section ospf # router ospf 2 vrf vrf01 # redistribute connected @@ -3455,54 +3297,47 @@ Examples # router ospf 3 vrf vrf02 # redistribute connected # max-lsa 12000 - # localhost# - - name: replace Ospf configs - arista.eos.eos_ospfv2: - state: gathered - - # "gathered": [ - # { - # "processes": [ - # { - # "areas": [ - # { - # "default_cost": 20, - # "id": "0.0.0.9" - # } - # ], - # "max_lsa": { - # "count": 8000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "process_id": 2, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf01" - # }, - # { - # "max_lsa": { - # "count": 12000 - # }, - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - - # Using parsed: + # Using gathered + # localhost#show running-config | section ospf + # router ospf 2 vrf vrf01 + # redistribute connected + # area 0.0.0.9 default-cost 20 + # max-lsa 8000 40 ignore-time 6 ignore-count 3 reset-time 20 + # ! + # router ospf 3 vrf vrf02 + # redistribute connected + # max-lsa 12000 + + - name: replace Ospf configs + arista.eos.eos_ospfv2: + state: gathered + + # Task output: + # ------------ + # gathered: + # processes: + # - areas: + # - area_id: 0.0.0.9 + # default_cost: 20 + # max_lsa: + # count: 8000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # process_id: 2 + # redistribute: + # - routes: connected + # vrf: vrf01 + # - max_lsa: + # count: 12000 + # process_id: 3 + # redistribute: + # - routes: connected + # vrf: vrf02 + + # Using parsed # ------------ # parsed.cfg @@ -3523,153 +3358,165 @@ Examples # router ospf 3 vrf vrf02 # redistribute static - - name: Parse Ospf configs - arista.eos.eos_ospfv2: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed - - # "parsed": [ - # { - # "processes": [ - # { - # "adjacency": { - # "exchange_start": { - # "threshold": 20045623 - # } - # }, - # "areas": [ - # { - # "filter": { - # "address": "10.1.1.0/24" - # }, - # "id": "0.0.0.2" - # }, - # { - # "id": "0.0.0.50", - # "range": { - # "address": "172.20.0.0/16", - # "cost": 34 - # } - # } - # ], - # "default_information": { - # "metric": 100, - # "metric_type": 1, - # "originate": true - # }, - # "distance": { - # "intra_area": 85 - # }, - # "max_lsa": { - # "count": 80000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "networks": [ - # { - # "area": "0.0.0.0", - # "prefix": "10.10.2.0/24" - # }, - # { - # "area": "0.0.0.0", - # "prefix": "10.10.3.0/24" - # } - # ], - # "process_id": 1, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "router_id": "170.21.0.4" - # }, - # { - # "areas": [ - # { - # "default_cost": 20, - # "id": "0.0.0.9" - # } - # ], - # "max_lsa": { - # "count": 80000, - # "ignore_count": 3, - # "ignore_time": 6, - # "reset_time": 20, - # "threshold": 40 - # }, - # "process_id": 2, - # "vrf": "vrf01," - # }, - # { - # "process_id": 3, - # "redistribute": [ - # { - # "routes": "static" - # } - # ], - # "vrf": "vrf02" - # } - # ] - # } - # ] - - # Using rendered: - # -------------- - - - name: replace Ospf configs - arista.eos.eos_ospfv2: - config: - - processes: - - process_id: 1 - adjacency: - exchange_start: - threshold: 20045623 - areas: - - filter: - address: 10.1.1.0/24 - id: 0.0.0.2 - - id: 0.0.0.50 - range: - address: 172.20.0.0/16 - cost: 34 - default_information: - metric: 100 - metric_type: 1 - originate: true - distance: - intra_area: 85 - max_lsa: - count: 8000 - ignore_count: 3 - ignore_time: 6 - reset_time: 20 - threshold: 40 - networks: - - area: 0.0.0.0 - prefix: 10.10.2.0/24 - - area: 0.0.0.0 - prefix: 10.10.3.0/24 - redistribute: - - routes: static - router_id: 170.21.0.4 - state: rendered - - # "rendered": [ - # "router ospf 1", - # "adjacency exchange-start threshold 20045623", - # "area 0.0.0.2 filter 10.1.1.0/24", - # "area 0.0.0.50 range 172.20.0.0/16 cost 34", - # "default-information originate metric 100 metric-type 1", - # "distance ospf intra-area 85", - # "max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20", - # "network 10.10.2.0/24 area 0.0.0.0", - # "network 10.10.3.0/24 area 0.0.0.0", - # "redistribute static", - # "router-id 170.21.0.4" - # ] - # + - name: Parse running config and display structured facts + arista.eos.eos_ospfv2: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed + + # Task output: + # ------------ + # parsed: + # processes: + # - adjacency: + # exchange_start: + # threshold: 20045623 + # areas: + # - area_id: 0.0.0.2 + # filter: + # address: 10.1.1.0/24 + # - area_id: 0.0.0.50 + # range: + # address: 172.20.0.0/16 + # cost: 34 + # default_information: + # metric: 100 + # metric_type: 1 + # originate: true + # distance: + # intra_area: 85 + # max_lsa: + # count: 80000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # networks: + # - area: 0.0.0.0 + # prefix: 10.10.2.0/24 + # - area: 0.0.0.0 + # prefix: 10.10.3.0/24 + # process_id: 1 + # redistribute: + # - routes: static + # router_id: 170.21.0.4 + # - areas: + # - area_id: 0.0.0.9 + # default_cost: 20 + # max_lsa: + # count: 80000 + # ignore_count: 3 + # ignore_time: 6 + # reset_time: 20 + # threshold: 40 + # process_id: 2 + # vrf: vrf01, + # - process_id: 3 + # redistribute: + # - routes: static + # vrf: vrf02 + + # Using rendered + + - name: replace Ospf configs + arista.eos.eos_ospfv2: + config: + processes: + - process_id: 1 + adjacency: + exchange_start: + threshold: 20045623 + areas: + - filter: + address: "10.1.1.0/24" + area_id: "0.0.0.2" + - area_id: "0.0.0.50" + range: + address: "172.20.0.0/16" + cost: 34 + default_information: + metric: 100 + metric_type: 1 + originate: true + distance: + intra_area: 85 + max_lsa: + count: 8000 + ignore_count: 3 + ignore_time: 6 + reset_time: 20 + threshold: 40 + networks: + - area: "0.0.0.0" + prefix: 10.10.2.0/24 + - area: "0.0.0.0" + prefix: "10.10.3.0/24" + redistribute: + - routes: "static" + router_id: "170.21.0.4" + - process_id: 2 + vrf: "vrf01" + areas: + - area_id: "0.0.0.9" + default_cost: 20 + max_lsa: + count: 8000 + ignore_count: 3 + ignore_time: 6 + reset_time: 20 + threshold: 40 + networks: + - area: "0.0.0.0" + prefix: 10.10.2.0/24 + - area: "0.0.0.0" + prefix: "10.10.3.0/24" + redistribute: + - routes: "static" + router_id: "170.21.0.4" + - process_id: 2 + vrf: "vrf01" + areas: + - area_id: "0.0.0.9" + default_cost: 20 + max_lsa: + count: 8000 + ignore_count: 3 + ignore_time: 6 + reset_time: 20 + threshold: 40 + - process_id: 3 + vrf: "vrf02" + redistribute: + - routes: "connected" + state: rendered + + # rendered: + # - router ospf 1 + # - adjacency exchange-start threshold 20045623 + # - area 0.0.0.2 filter 10.1.1.0/24 + # - area 0.0.0.50 range 172.20.0.0/16 cost 34 + # - default-information originate metric 100 metric-type 1 + # - distance ospf intra-area 85 + # - max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20 + # - network 10.10.2.0/24 area 0.0.0.0 + # - network 10.10.3.0/24 area 0.0.0.0 + # - redistribute static + # - router-id 170.21.0.4 + # - exit + # - router ospf 2 vrf vrf01 + # - area 0.0.0.9 default-cost 20 + # - max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20 + # - network 10.10.2.0/24 area 0.0.0.0 + # - network 10.10.3.0/24 area 0.0.0.0 + # - redistribute static + # - router-id 170.21.0.4 + # - exit + # - router ospf 2 vrf vrf01 + # - area 0.0.0.9 default-cost 20 + # - max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20 + # - exit + # - router ospf 3 vrf vrf02 + # - redistribute connected + # - exit @@ -3691,16 +3538,15 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <b>after</b> <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> <div style="font-size: small"> - <span style="color: purple">list</span> + <span style="color: purple">dictionary</span> </div> </td> <td>when changed</td> <td> - <div>The resulting configuration model invocation.</div> + <div>The resulting configuration after module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format - of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -3709,16 +3555,15 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <b>before</b> <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> <div style="font-size: small"> - <span style="color: purple">list</span> + <span style="color: purple">dictionary</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> - <div>The configuration prior to the model invocation.</div> + <div>The configuration prior to the module execution.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format - of the parameters above.</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> </td> </tr> <tr> @@ -3730,12 +3575,63 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">list</span> </div> </td> - <td>always</td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> <td> <div>The set of commands pushed to the remote device.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router ospf 1', 'adjacency exchange-start threshold 20045623', 'area 0.0.0.2 filter 10.1.1.0/24', 'area 0.0.0.50 range 172.20.0.0/16 cost 34', 'default-information originate metric 100 metric-type 1', 'distance ospf intra-area 85', 'max-lsa 8000 40 ignore-count 3 ignore-time 6 reset-time 20', 'network 10.10.2.0/24 area 0.0.0.0', 'network 10.10.3.0/24 area 0.0.0.0', 'redistribute static', 'router-id 170.21.0.4']</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router ospf 1', 'adjacency exchange-start threshold 20045623', 'area 0.0.0.2 filter 10.1.1.0/24']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router ospf 1', 'adjacency exchange-start threshold 20045623', 'area 0.0.0.2 filter 10.1.1.0/24']</div> </td> </tr> </table> diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv3_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv3_module.rst index 76f0a7267..8cb04a354 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv3_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_ospfv3_module.rst @@ -266,7 +266,7 @@ Parameters </ul> </td> <td> - <div>If False, key string is not encrypted</div> + <div>If false, key string is not encrypted</div> </td> </tr> <tr> @@ -290,7 +290,7 @@ Parameters </ul> </td> <td> - <div>If True, Specifies that a HIDDEN key will follow.</div> + <div>If true, Specifies that a HIDDEN key will follow.</div> </td> </tr> <tr> @@ -437,7 +437,7 @@ Parameters </ul> </td> <td> - <div>If False, key string is not encrypted</div> + <div>If false, key string is not encrypted</div> </td> </tr> <tr> @@ -488,7 +488,7 @@ Parameters </ul> </td> <td> - <div>If True, Specifies that a HIDDEN key will follow.</div> + <div>If true, Specifies that a HIDDEN key will follow.</div> </td> </tr> <tr> @@ -680,7 +680,7 @@ Parameters </ul> </td> <td> - <div>True if only default information orignate is set</div> + <div>true if only default information orignate is set</div> </td> </tr> @@ -753,7 +753,7 @@ Parameters </ul> </td> <td> - <div>True if only nssa is set</div> + <div>true if only nssa is set</div> </td> </tr> <tr> @@ -946,7 +946,7 @@ Parameters </ul> </td> <td> - <div>True if only stub is set</div> + <div>true if only stub is set</div> </td> </tr> <tr> @@ -970,7 +970,7 @@ Parameters </ul> </td> <td> - <div>If False , Filter all type-3 LSAs in the stub area.</div> + <div>If false , Filter all type-3 LSAs in the stub area.</div> </td> </tr> @@ -1315,7 +1315,7 @@ Parameters </ul> </td> <td> - <div>If True, Enable graceful restart helper.</div> + <div>If true, Enable graceful restart helper.</div> </td> </tr> <tr> @@ -2337,7 +2337,7 @@ Parameters </ul> </td> <td> - <div>If False, key string is not encrypted</div> + <div>If false, key string is not encrypted</div> </td> </tr> <tr> @@ -2360,7 +2360,7 @@ Parameters </ul> </td> <td> - <div>If True, Specifies that a HIDDEN key will follow.</div> + <div>If true, Specifies that a HIDDEN key will follow.</div> </td> </tr> <tr> @@ -2500,7 +2500,7 @@ Parameters </ul> </td> <td> - <div>If False, key string is not encrypted</div> + <div>If false, key string is not encrypted</div> </td> </tr> <tr> @@ -2549,7 +2549,7 @@ Parameters </ul> </td> <td> - <div>If True, Specifies that a HIDDEN key will follow.</div> + <div>If true, Specifies that a HIDDEN key will follow.</div> </td> </tr> <tr> @@ -2732,7 +2732,7 @@ Parameters </ul> </td> <td> - <div>True if only default information orignate is set</div> + <div>true if only default information orignate is set</div> </td> </tr> @@ -2802,7 +2802,7 @@ Parameters </ul> </td> <td> - <div>True if only nssa is set</div> + <div>true if only nssa is set</div> </td> </tr> <tr> @@ -2867,7 +2867,7 @@ Parameters </ul> </td> <td> - <div>True if only stub is set.</div> + <div>true if only stub is set.</div> </td> </tr> <tr> @@ -2890,7 +2890,7 @@ Parameters </ul> </td> <td> - <div>If False , Filter all type-3 LSAs in the stub area.</div> + <div>If false , Filter all type-3 LSAs in the stub area.</div> </td> </tr> @@ -3068,7 +3068,7 @@ Parameters </ul> </td> <td> - <div>If True, Enable graceful restart helper.</div> + <div>If true, Enable graceful restart helper.</div> </td> </tr> <tr> @@ -3898,30 +3898,59 @@ Examples # Using merged - # Before state - + # Before state: + # ------------- # veos#show running-config | section ospfv3 # veos# - - - arista.eos.eos_ospfv3: - config: - processes: - - address_family: - - timers: - lsa: 22 - graceful_restart: - grace_period: 35 - afi: "ipv6" - timers: - pacing: 55 - fips_restrictions: True - router_id: "2.2.2.2" - vrf: "vrfmerge" - - - # After state - + - name: Merge the provided configuration with the existing running configuration + arista.eos.eos_ospfv3: + config: + processes: + - address_family: + - timers: + lsa: 22 + graceful_restart: + grace_period: 35 + afi: "ipv6" + timers: + pacing: 55 + fips_restrictions: true + router_id: "2.2.2.2" + vrf: "vrfmerge" + state: merged + + + # Task output: + # ------------ + # before: {} + # + # commands: + # - router ospfv3 vrf vrfmerge + # - address-family ipv6 + # - graceful-restart grace-period 35 + # - timers lsa arrival 22 + # - exit + # - timers pacing flood 55 + # - fips restrictions + # - router-id 2.2.2.2 + # - exit + # + # after: + # processes: + # - address_family: + # - afi: ipv6 + # fips_restrictions: true + # graceful_restart: + # grace_period: 35 + # fips_restrictions: true + # router_id: 2.2.2.2 + # timers: + # pacing: 55 + # vrf: vrfmerge + + # After state: + # ------------ # veos#show running-config | section ospfv3 # router ospfv3 vrf vrfmerge # router-id 2.2.2.2 @@ -3933,52 +3962,11 @@ Examples # fips restrictions # timers lsa arrival 22 # graceful-restart grace-period 35 - # veos# - - # Module Execution - # "after": { - # "processes": [ - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "fips_restrictions": true, - # "graceful_restart": { - # "grace_period": 35 - # }, - # "timers": { - # "lsa": 22 - # } - # } - # ], - # "fips_restrictions": true, - # "router_id": "2.2.2.2", - # "timers": { - # "pacing": 55 - # }, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "before": {}, - # "changed": true, - # "commands": [ - # "router ospfv3 vrf vrfmerge", - # "address-family ipv6", - # "graceful-restart grace-period 35", - # "timers lsa arrival 22", - # "exit", - # "timers pacing flood 55", - # "fips restrictions", - # "router-id 2.2.2.2", - # "exit" - # ], - # using replaced - # before state - + # Before state: + # ------------- # veos#show running-config | section ospfv3 # router ospfv3 # fips restrictions @@ -3993,27 +3981,89 @@ Examples # fips restrictions # timers lsa arrival 22 # graceful-restart grace-period 35 - # veos# - - - - arista.eos.eos_ospfv3: - config: - processes: - - areas: - - area_id: "0.0.0.0" - encryption: - spi: 43 - encryption: "null" - algorithm: "md5" - encrypt_key: False - passphrase: "7hl8FV3lZ6H1mAKpjL47hQ==" - vrf: "default" - address_family: - - afi: "ipv4" - router_id: "7.1.1.1" - state: replaced - # After state + - name: Replace a section of running config with provided config + arista.eos.eos_ospfv3: + config: + processes: + - areas: + - area_id: "0.0.0.0" + encryption: + spi: 43 + encryption: "null" + algorithm: "md5" + encrypt_key: false + passphrase: "7hl8FV3lZ6H1mAKpjL47hQ==" + vrf: "default" + address_family: + - afi: "ipv4" + router_id: "7.1.1.1" + state: replaced + + # Task output: + # ------------ + # before: + # processes: + # - areas: + # - area_id: 0.0.0.0 + # encryption: + # algorithm: md5 + # encryption: 'null' + # hidden_key: true + # passphrase: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER + # spi: 43 + # fips_restrictions: true + # vrf: default + # - address_family: + # - afi: ipv6 + # fips_restrictions: true + # graceful_restart: + # grace_period: 35 + # fips_restrictions: true + # router_id: 2.2.2.2 + # timers: + # pacing: 55 + # vrf: vrfmerge + # + # commands: + # - router ospfv3 vrf vrfmerge + # - address-family ipv6 + # - no fips restrictions + # - no graceful-restart + # - no timers lsa arrival 22 + # - area 0.0.0.3 range 10.1.2.2/24 advertise + # - area 0.0.0.3 range 60.1.1.1 255.255.0.0 cost 30 + # - exit + # - passive-interface default + # - no router-id + # - no fips restrictions + # - no timers pacing flood 55 + # - exit + # + # after: + # processes: + # - areas: + # - area_id: 0.0.0.0 + # encryption: + # algorithm: md5 + # encryption: 'null' + # hidden_key: true + # passphrase: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER + # spi: 43 + # vrf: default + # - address_family: + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # passive_interface: true + # vrf: vrfmerge + + # After state: + # ------------ # veos#show running-config | section ospfv3 # router ospfv3 # area 0.0.0.0 encryption ipsec spi 43 esp null md5 passphrase 7 h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4= @@ -4024,112 +4074,11 @@ Examples # address-family ipv6 # area 0.0.0.3 range 10.1.2.0/24 # area 0.0.0.3 range 60.1.0.0/16 cost 30 - # veos# - - # Module execution - - # "after": { - # "processes": [ - # { - # "areas": [ - # { - # "area_id": "0.0.0.0", - # "encryption": { - # "algorithm": "md5", - # "encryption": "null", - # "hidden_key": true, - # "passphrase": "h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4=" - # } - # } - # ], - # "vrf": "default" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ] - # } - # ], - # "passive_interface": true, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "before": { - # "processes": [ - # { - # "areas": [ - # { - # "area_id": "0.0.0.0", - # "encryption": { - # "algorithm": "md5", - # "encryption": "null", - # "hidden_key": true, - # "passphrase": "h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4=" - # } - # } - # ], - # "fips_restrictions": true, - # "vrf": "default" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "fips_restrictions": true, - # "graceful_restart": { - # "grace_period": 35 - # }, - # "timers": { - # "lsa": 22 - # } - # } - # ], - # "fips_restrictions": true, - # "router_id": "2.2.2.2", - # "timers": { - # "pacing": 55 - # }, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "changed": true, - # "commands": [ - # "router ospfv3 vrf vrfmerge", - # "address-family ipv6", - # "no fips restrictions", - # "no graceful-restart", - # "no timers lsa arrival 22", - # "area 0.0.0.3 range 10.1.2.2/24 advertise", - # "area 0.0.0.3 range 60.1.1.1 255.255.0.0 cost 30", - # "exit", - # "passive-interface default", - # "no router-id", - # "no fips restrictions", - # "no timers pacing flood 55", - # "exit" - # ], - # using overridden - # before state - + # Before state: + # ------------- # veos#show running-config | section ospfv3 # router ospfv3 # area 0.0.0.0 encryption ipsec spi 43 esp null md5 passphrase 7 h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4= @@ -4140,28 +4089,75 @@ Examples # address-family ipv6 # area 0.0.0.3 range 10.1.2.0/24 # area 0.0.0.3 range 60.1.0.0/16 cost 30 - # veos# - - - - arista.eos.eos_ospfv3: - config: - processes: - - address_family: - - areas: - - area_id: "0.0.0.3" - ranges: - - address: 10.1.2.2/24 - advertise: True - - address: 60.1.1.1 - subnet_mask: 255.255.0.0 - cost: 30 - afi: "ipv6" - passive_interface: True - vrf: "vrfmerge" - state: overridden - - # After state + - name: Override running config with provided config + arista.eos.eos_ospfv3: + config: + processes: + - address_family: + - areas: + - area_id: "0.0.0.3" + ranges: + - address: 10.1.2.2/24 + advertise: true + - address: 60.1.1.1 + subnet_mask: 255.255.0.0 + cost: 30 + afi: "ipv6" + passive_interface: true + vrf: "vrfmerge" + state: overridden + + # Task output: + # ------------ + # before: + # processes: + # - areas: + # - area_id: 0.0.0.0 + # encryption: + # algorithm: md5 + # encryption: 'null' + # hidden_key: true + # passphrase: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER + # spi: 43 + # vrf: default + # - address_family: + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # passive_interface: true + # vrf: vrfmerge + # + # commands: + # - no router ospfv3 + # - router ospfv3 vrf vrfmerge + # - address-family ipv6 + # - no area 0.0.0.3 range 10.1.2.0/24 + # - no area 0.0.0.3 range 60.1.0.0/16 cost 30 + # - area 0.0.0.3 range 10.1.2.2/24 advertise + # - area 0.0.0.3 range 60.1.1.1 255.255.0.0 cost 30 + # - exit + # - exit + # + # after: + # processes: + # - address_family: + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # passive_interface: true + # vrf: vrfmerge + + # After state: + # ------------ # veos#show running-config | section ospfv3 # router ospfv3 vrf vrfmerge # passive-interface default @@ -4169,97 +4165,11 @@ Examples # address-family ipv6 # area 0.0.0.3 range 10.1.2.0/24 # area 0.0.0.3 range 60.1.0.0/16 cost 30 - # veos# - - - - # Module execution - - # "after": { - # "processes": [ - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ] - # } - # ], - # "passive_interface": true, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "before": { - # "processes": [ - # { - # "areas": [ - # { - # "area_id": "0.0.0.0", - # "encryption": { - # "algorithm": "md5", - # "encryption": "null", - # "hidden_key": true, - # "passphrase": "h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4=" - # } - # } - # ], - # "vrf": "default" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ] - # } - # ], - # "passive_interface": true, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "changed": true, - # "commands": [ - # "no router ospfv3", - # "router ospfv3 vrf vrfmerge", - # "address-family ipv6", - # "no area 0.0.0.3 range 10.1.2.0/24", - # "no area 0.0.0.3 range 60.1.0.0/16 cost 30", - # "area 0.0.0.3 range 10.1.2.2/24 advertise", - # "area 0.0.0.3 range 60.1.1.1 255.255.0.0 cost 30", - # "exit", - # "exit" - # ], # using deleted - # Before state - + # Before state: + # ------------- # veos#show running-config | section ospfv3 # router ospfv3 # area 0.0.0.0 encryption ipsec spi 43 esp null md5 passphrase 7 h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4= @@ -4276,17 +4186,56 @@ Examples # address-family ipv6 # area 0.0.0.3 range 10.1.2.0/24 # area 0.0.0.3 range 60.1.0.0/16 cost 30 - # veos# - - - - arista.eos.eos_ospfv3: - config: - processes: - - vrf: "default" - state: deleted - - # After state + - name: Delete OSPFv3 config + arista.eos.eos_ospfv3: + config: + state: deleted + + # Task output: + # ------------ + + # before: + # processes: + # - areas: + # - area_id: 0.0.0.0 + # encryption: + # algorithm: md5 + # encryption: 'null' + # hidden_key: true + # passphrase: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER + # spi: 43 + # vrf: default + # - address_family: + # - afi: ipv4 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # redistribute: + # - routes: connected + # - route_map: MAP01 + # routes: static + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # passive_interface: true + # vrf: vrfmerge + # + # commands: + # + # - no router ospfv3 + # + # after: {} + + # After state: + # ------------ # veos#show running-config | section ospfv3 # router ospfv3 vrf vrfmerge # passive-interface default @@ -4300,139 +4249,10 @@ Examples # address-family ipv6 # area 0.0.0.3 range 10.1.2.0/24 # area 0.0.0.3 range 60.1.0.0/16 cost 30 - # veos# - - - # Module execution - # "after": { - # "processes": [ - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ], - # "redistribute": [ - # { - # "routes": "connected" - # }, - # { - # "route_map": "MAP01", - # "routes": "static" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ] - # } - # ], - # "passive_interface": true, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "before": { - # "processes": [ - # { - # "areas": [ - # { - # "area_id": "0.0.0.0", - # "encryption": { - # "algorithm": "md5", - # "encryption": "null", - # "hidden_key": true, - # "passphrase": "h8pZp9eprTYjjoY/NKFFe0Ei7x03Y7dyLotRhI0a5t4=" - # } - # } - # ], - # "vrf": "default" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ], - # "redistribute": [ - # { - # "routes": "connected" - # }, - # { - # "route_map": "MAP01", - # "routes": "static" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ] - # } - # ], - # "passive_interface": true, - # "vrf": "vrfmerge" - # } - # ] - # }, - # "changed": true, - # "commands": [ - # "no router ospfv3" - # ], # using parsed # parsed_ospfv3.cfg - # router ospfv3 # fips restrictions # area 0.0.0.20 stub @@ -4479,159 +4299,101 @@ Examples # timers spf delay initial 56 56 56 # timers out-delay 10 - - - arista.eos.eos_ospfv3: - running_config: "{{ lookup('file', './parsed_ospfv3.cfg') }}" - state: parsed - - # Module execution - - # "parsed": { - # "processes": [ - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "fips_restrictions": true, - # "redistribute": [ - # { - # "routes": "connected" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "fips_restrictions": true, - # "router_id": "10.1.1.1" - # } - # ], - # "adjacency": { - # "exchange_start": { - # "threshold": 11 - # } - # }, - # "areas": [ - # { - # "area_id": "0.0.0.20", - # "authentication": { - # "algorithm": "sha1", - # "hidden_key": true, - # "passphrase": "4O8T3zo4xBdRWXBnsnK934o9SEb+jEhHUN6+xzZgCo2j9EnQBUvtwNxxLEmYmm6w", - # "spi": 33 - # }, - # "stub": { - # "set": true - # } - # }, - # { - # "area_id": "0.0.0.40", - # "default_cost": 45, - # "stub": { - # "set": true - # } - # } - # ], - # "fips_restrictions": true, - # "timers": { - # "pacing": 7 - # }, - # "vrf": "default" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "fips_restrictions": true, - # "maximum_paths": 100, - # "passive_interface": true, - # "redistribute": [ - # { - # "route_map": "MAP01", - # "routes": "connected" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.10", - # "nssa": { - # "no_summary": true - # } - # } - # ], - # "default_information": { - # "originate": true, - # "route_map": "DefaultRouteFilter" - # }, - # "fips_restrictions": true, - # "max_metric": { - # "router_lsa": { - # "external_lsa": { - # "max_metric_value": 25 - # }, - # "summary_lsa": { - # "set": true - # } - # } - # } - # } - # ], - # "areas": [ - # { - # "area_id": "0.0.0.0", - # "encryption": { - # "algorithm": "sha1", - # "encryption": "null", - # "hidden_key": true, - # "passphrase": "7hl8FV3lZ6H1mAKpjL47hQ==" - # } - # } - # ], - # "bfd": { - # "all_interfaces": true - # }, - # "fips_restrictions": true, - # "log_adjacency_changes": { - # "detail": true - # }, - # "vrf": "vrf01" - # }, - # { - # "address_family": [ - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.1", - # "stub": { - # "set": true - # } - # } - # ], - # "distance": 200, - # "fips_restrictions": true, - # "router_id": "10.17.0.3", - # "timers": { - # "out_delay": 10, - # "spf": { - # "initial": 56, - # "max": 56, - # "min": 56, - # } - # } - # } - # ], - # "fips_restrictions": true, - # "vrf": "vrf02" - # } - # ] + - name: Parse the provided config + arista.eos.eos_ospfv3: + running_config: "{{ lookup('file', './parsed_ospfv3.cfg') }}" + state: parsed + + # Task output: + # ------------ + # parsed: + # processes: + # - address_family: + # - afi: ipv4 + # fips_restrictions: true + # redistribute: + # - routes: connected + # - afi: ipv6 + # fips_restrictions: true + # router_id: 10.1.1.1 + # adjacency: + # exchange_start: + # threshold: 11 + # areas: + # - area_id: 0.0.0.20 + # authentication: + # algorithm: sha1 + # hidden_key: true + # passphrase: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER + # spi: 33 + # stub: + # set: true + # - area_id: 0.0.0.40 + # default_cost: 45 + # stub: + # set: true + # fips_restrictions: true + # timers: + # pacing: 7 + # vrf: default + # - address_family: + # - afi: ipv4 + # fips_restrictions: true + # maximum_paths: 100 + # passive_interface: true + # redistribute: + # - route_map: MAP01 + # routes: connected + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.10 + # nssa: + # no_summary: true + # default_information: + # originate: true + # route_map: DefaultRouteFilter + # fips_restrictions: true + # max_metric: + # router_lsa: + # external_lsa: + # max_metric_value: 25 + # summary_lsa: + # set: true + # areas: + # - area_id: 0.0.0.0 + # encryption: + # algorithm: sha1 + # encryption: 'null' + # hidden_key: true + # passphrase: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER + # spi: 256 + # bfd: + # all_interfaces: true + # fips_restrictions: true + # log_adjacency_changes: + # detail: true + # vrf: vrf01 + # - address_family: + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.1 + # stub: + # set: true + # distance: 200 + # fips_restrictions: true + # router_id: 10.17.0.3 + # timers: + # out_delay: 10 + # spf: + # initial: 56 + # max: 56 + # min: 56 + # fips_restrictions: true + # vrf: vrf02 # using gathered - # native config - + # native config: # veos#show running-config | section ospfv3 # router ospfv3 vrf vrfmerge # passive-interface default @@ -4645,100 +4407,188 @@ Examples # address-family ipv6 # area 0.0.0.3 range 10.1.2.0/24 # area 0.0.0.3 range 60.1.0.0/16 cost 30 - # veos# - - - - arista.eos.eos_ospfv3: - state: gathered - # module execution + - name: Gather running configuration + arista.eos.eos_ospfv3: + state: gathered + + # Task output: + # ------------ + # gathered: + # processes: + # - address_family: + # - afi: ipv4 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # redistribute: + # - routes: connected + # - route_map: MAP01 + # routes: static + # - afi: ipv6 + # areas: + # - area_id: 0.0.0.3 + # ranges: + # - address: 10.1.2.0/24 + # - address: 60.1.0.0/16 + # cost: 30 + # passive_interface: true + # vrf: vrfmerge - # "gathered": { - # "processes": [ - # { - # "address_family": [ - # { - # "afi": "ipv4", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ], - # "redistribute": [ - # { - # "routes": "connected" - # }, - # { - # "route_map": "MAP01", - # "routes": "static" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "areas": [ - # { - # "area_id": "0.0.0.3", - # "ranges": [ - # { - # "address": "10.1.2.0/24" - # }, - # { - # "address": "60.1.0.0/16", - # "cost": 30 - # } - # ] - # } - # ] - # } - # ], - # "passive_interface": true, - # "vrf": "vrfmerge" - # } - # ] # using rendered - - arista.eos.eos_ospfv3: - config: - processes: - - address_family: - - timers: - lsa: 22 - graceful_restart: - grace_period: 35 - afi: "ipv6" - timers: - pacing: 55 - fips_restrictions: True - router_id: "2.2.2.2" - vrf: "vrfmerge" - state: rendered - - # module execution - - # "rendered": [ - # "router ospfv3 vrf vrfmerge", - # "address-family ipv6", - # "graceful-restart grace-period 35", - # "timers lsa arrival 22", - # "exit", - # "timers pacing flood 55", - # "fips restrictions", - # "router-id 2.2.2.2", - # "exit" - # ] + - name: render CLI commands for provided config + arista.eos.eos_ospfv3: + config: + processes: + - address_family: + - timers: + lsa: 22 + graceful_restart: + grace_period: 35 + afi: "ipv6" + timers: + pacing: 55 + fips_restrictions: true + router_id: "2.2.2.2" + vrf: "vrfmerge" + state: rendered + + # Task output: + # ------------ + # rendered: + # - router ospfv3 vrf vrfmerge + # - address-family ipv6 + # - graceful-restart grace-period 35 + # - timers lsa arrival 22 + # - exit + # - timers pacing flood 55 + # - fips restrictions + # - router-id 2.2.2.2 + # - exit + + + +Return Values +------------- +Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: +.. raw:: html + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Key</th> + <th>Returned</th> + <th width="100%">Description</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>after</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when changed</td> + <td> + <div>The resulting configuration after module execution.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>before</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> + <td> + <div>The configuration prior to the module execution.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>commands</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, <code>deleted</code> or <code>purged</code></td> + <td> + <div>The set of commands pushed to the remote device.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router ospfv3 vrf vrfmerge', 'address-family ipv6', 'graceful-restart grace-period 35']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>gathered</code></td> + <td> + <div>Facts about the network resource gathered from the remote device as structured data.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">dictionary</span> + </div> + </td> + <td>when <em>state</em> is <code>parsed</code></td> + <td> + <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when <em>state</em> is <code>rendered</code></td> + <td> + <div>The provided configuration in the task rendered in device-native format (offline).</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['router ospfv3 vrf vrfmerge', 'address-family ipv6', 'graceful-restart grace-period 35']</div> + </td> + </tr> + </table> + <br/><br/> Status diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_prefix_lists_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_prefix_lists_module.rst index 7f2474438..7c3164abd 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_prefix_lists_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_prefix_lists_module.rst @@ -386,43 +386,88 @@ Examples .. code-block:: yaml # Using merged + + # Before state # veos#show running-config | section prefix-lists # veos# - - name: Merge provided configuration with device configuration - arista.eos.eos_prefix_lists: - config: - - afi: "ipv4" - prefix_lists: - - name: "v401" - entries: - - sequence: 25 - action: "deny" - address: "45.55.4.0/24" - - sequence: 100 - action: "permit" - address: "11.11.2.0/24" - match: - masklen: 32 - operator: "ge" - - name: "v402" - entries: - - action: "deny" - address: "10.1.1.0/24" - sequence: 10 - match: - masklen: 32 - operator: "ge" - - afi: "ipv6" - prefix_lists: - - name: "v601" - entries: - - sequence: 125 - action: "deny" - address: "5000:1::/64" + - name: Merge provided configuration with device configuration + arista.eos.eos_prefix_lists: + config: + - afi: "ipv4" + prefix_lists: + - name: "v401" + entries: + - sequence: 25 + action: "deny" + address: "45.55.4.0/24" + - sequence: 100 + action: "permit" + address: "11.11.2.0/24" + match: + masklen: 32 + operator: "ge" + - name: "v402" + entries: + - action: "deny" + address: "10.1.1.0/24" + sequence: 10 + match: + masklen: 32 + operator: "ge" + - afi: "ipv6" + prefix_lists: + - name: "v601" + entries: + - sequence: 125 + action: "deny" + address: "5000:1::/64" - # After State + # Task Output + # ------------- + # before: {} + # commands: + # - ipv6 prefix-list v601 + # - seq 125 deny 5000:1::/64 + # - ip prefix-list v401 + # - seq 25 deny 45.55.4.0/24 + # - seq 100 permit 11.11.2.0/24 ge 32 + # - ip prefix-list v402 + # - seq 10 deny 10.1.1.0/24 ge 32 + # after: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 + + + # After state: + # ------------ # veos# # veos#show running-config | section prefix-list # ip prefix-list v401 @@ -435,81 +480,13 @@ Examples # ipv6 prefix-list v601 # seq 125 deny 5000:1::/64 # veos# - # - # Module Execution: - # "after": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], - # "before": {}, - # "changed": true, - # "commands": [ - # "ipv6 prefix-list v601", - # "seq 125 deny 5000:1::/64", - # "ip prefix-list v401", - # "seq 25 deny 45.55.4.0/24", - # "seq 100 permit 11.11.2.0/24 ge 32", - # "ip prefix-list v402", - # "seq 10 deny 10.1.1.0/24 ge 32" - # ], - # - # using merged: + + # Using merged: # Failure scenario : 'merged' should not be used when an existing prefix-list (sequence number) # is to be modified. - # Before State: + # veos#show running-config | section prefix-list # ip prefix-list v401 # seq 25 deny 45.55.4.0/24 @@ -522,118 +499,89 @@ Examples # seq 125 deny 5000:1::/64 # veos# - - name: Merge provided configuration with device configuration - arista.eos.eos_prefix_lists: - config: - - afi: "ipv4" - prefix_lists: - - name: "v401" - entries: - - sequence: 25 - action: "deny" - address: "45.55.4.0/24" - match: - masklen: 32 - operator: "ge" - - sequence: 100 - action: "permit" - address: "11.11.2.0/24" - match: - masklen: 32 - operator: "ge" - - name: "v402" - entries: - - action: "deny" - address: "10.1.1.0/24" - sequence: 10 - match: - masklen: 32 - operator: "ge" - - afi: "ipv6" - prefix_lists: - - name: "v601" - entries: - - sequence: 125 - action: "deny" - address: "5000:1::/64" - state: merged - - # Module Execution: - # fatal: [192.168.122.113]: FAILED! => { - # "changed": false, - # "invocation": { - # "module_args": { - # "config": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "resequence": null, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "resequence": null, - # "sequence": 100 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "resequence": null, - # "sequence": 10 - # } - # ], - # "name": "v402" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "match": null, - # "resequence": null, - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], - # "running_config": null, - # "state": "merged" - # } - # }, - # "msg": "Sequence number 25 is already present. Use replaced/overridden operation to change the configuration" - # } - # + - name: Merge provided configuration with device configuration + arista.eos.eos_prefix_lists: + config: + - afi: "ipv4" + prefix_lists: + - name: "v401" + entries: + - sequence: 25 + action: "deny" + address: "45.55.4.0/24" + match: + masklen: 32 + operator: "ge" + - sequence: 100 + action: "permit" + address: "11.11.2.0/24" + match: + masklen: 32 + operator: "ge" + - name: "v402" + entries: + - action: "deny" + address: "10.1.1.0/24" + sequence: 10 + match: + masklen: 32 + operator: "ge" + - afi: "ipv6" + prefix_lists: + - name: "v601" + entries: + - sequence: 125 + action: "deny" + address: "5000:1::/64" + state: merged + + # Task Output + # ------------- + # changed: false + # invocation: + # module_args: + # config: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # resequence: + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # resequence: + # sequence: 100 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # resequence: + # sequence: 10 + # name: v402 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # match: + # resequence: + # sequence: 125 + # name: v601 + # running_config: + # state: merged + # msg: Sequence number 25 is already present. Use replaced/overridden operation to change + # the configuration + # Using Replaced: @@ -649,26 +597,94 @@ Examples # ipv6 prefix-list v601 # seq 125 deny 5000:1::/64 # veos# - - name: Replace - arista.eos.eos_prefix_lists: - config: - - afi: "ipv4" - prefix_lists: - - name: "v401" - entries: - - sequence: 25 - action: "deny" - address: "45.55.4.0/24" - match: - masklen: 32 - operator: "ge" - - sequence: 200 - action: "permit" - address: "200.11.2.0/24" - match: - masklen: 32 - operator: "ge" - state: replaced + + + - name: Replace Provided configuration with given configuration + arista.eos.eos_prefix_lists: + config: + - afi: "ipv4" + prefix_lists: + - name: "v401" + entries: + - sequence: 25 + action: "deny" + address: "45.55.4.0/24" + match: + masklen: 32 + operator: "ge" + - sequence: 200 + action: "permit" + address: "200.11.2.0/24" + match: + masklen: 32 + operator: "ge" + state: replaced + + + # Task Output + # ------------- + # before: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 + # commands: + # - ip prefix-list v401 + # - no seq 25 + # - seq 25 deny 45.55.4.0/24 ge 32 + # - seq 200 permit 200.11.2.0/24 ge 32 + # - no seq 100 + # - no ip prefix-list v402 + # after: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 25 + # - action: permit + # address: 200.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 200 + # name: v401 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 + + # After State: # veos#show running-config | section prefix-list # ip prefix-list v401 @@ -680,121 +696,12 @@ Examples # veos# # # - # Module Execution: - # - # "after": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "200.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 200 - # } - # ], - # "name": "v401" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], - # "before": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], - # "changed": true, - # "commands": [ - # "ip prefix-list v401", - # "no seq 25", - # "seq 25 deny 45.55.4.0/24 ge 32", - # "seq 200 permit 200.11.2.0/24 ge 32", - # "no seq 100", - # "no ip prefix-list v402" - # ], + # Using overridden: - # Before State: + + # Before State: # veos#show running-config | section prefix-list # ip prefix-list v401 # seq 25 deny 45.55.4.0/24 ge 32 @@ -808,29 +715,103 @@ Examples # seq 125 deny 5000:1::/64 # veos# + - name: Override + arista.eos.eos_prefix_lists: + config: + - afi: "ipv4" + prefix_lists: + - name: "v401" + entries: + - sequence: 25 + action: "deny" + address: "45.55.4.0/24" + - sequence: 300 + action: "permit" + address: "30.11.2.0/24" + match: + masklen: 32 + operator: "ge" + - name: "v403" + entries: + - action: "deny" + address: "10.1.1.0/24" + sequence: 10 + state: overridden + + + # Task Output + # ------------- + # before: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # - action: permit + # address: 200.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 200 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 + # commands: + # - no ipv6 prefix-list v601 + # - ip prefix-list v401 + # - seq 25 deny 45.55.4.0/24 + # - seq 300 permit 30.11.2.0/24 ge 32 + # - no seq 100 + # - no seq 200 + # - ip prefix-list v403 + # - seq 10 deny 10.1.1.0/24 + # - no ip prefix-list v402 + # after: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 25 + # - action: permit + # address: 30.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 300 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # sequence: 10 + # name: v403 - - name: Override - arista.eos.eos_prefix_lists: - config: - - afi: "ipv4" - prefix_lists: - - name: "v401" - entries: - - sequence: 25 - action: "deny" - address: "45.55.4.0/24" - - sequence: 300 - action: "permit" - address: "30.11.2.0/24" - match: - masklen: 32 - operator: "ge" - - name: "v403" - entries: - - action: "deny" - address: "10.1.1.0/24" - sequence: 10 - state: overridden # After State # veos# @@ -842,134 +823,10 @@ Examples # ip prefix-list v403 # seq 10 deny 10.1.1.0/24 # veos# - # - # - # Module Execution: - # "after": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "30.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 300 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "sequence": 10 - # } - # ], - # "name": "v403" - # } - # ] - # } - # ], - # "before": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # }, - # { - # "action": "permit", - # "address": "200.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 200 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], - # "changed": true, - # "commands": [ - # "no ipv6 prefix-list v601", - # "ip prefix-list v401", - # "seq 25 deny 45.55.4.0/24", - # "seq 300 permit 30.11.2.0/24 ge 32", - # "no seq 100", - # "no seq 200", - # "ip prefix-list v403", - # "seq 10 deny 10.1.1.0/24", - # "no ip prefix-list v402" - # ], - # # Using deleted: - # Before State: + # Before State: # veos#show running-config | section prefix-list # ip prefix-list v401 # seq 25 deny 45.55.4.0/24 ge 32 @@ -986,12 +843,95 @@ Examples # seq 125 deny 5000:1::/64 # veos# - - name: Delete device configuration - arista.eos.eos_prefix_lists: - config: - - afi: "ipv6" - state: deleted + - name: Delete device configuration + arista.eos.eos_prefix_lists: + config: + - afi: "ipv6" + state: deleted + # Task Output + # ------------- + # before: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # - action: permit + # address: 30.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 300 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # sequence: 10 + # name: v403 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 + # commands: + # - no ipv6 prefix-list v601 + # after: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # - action: permit + # address: 30.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 300 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # sequence: 10 + # name: v403 # after State: # veos#show running-config | section prefix-list @@ -1006,158 +946,12 @@ Examples # ip prefix-list v403 # seq 10 deny 10.1.1.0/24 # - # - # Module Execution: - # "after": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # }, - # { - # "action": "permit", - # "address": "30.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 300 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "sequence": 10 - # } - # ], - # "name": "v403" - # } - # ] - # } - # ], - # "before": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # }, - # { - # "action": "permit", - # "address": "30.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 300 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "sequence": 10 - # } - # ], - # "name": "v403" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], - # "changed": true, - # "commands": [ - # "no ipv6 prefix-list v601" - # ], - # + # Using deleted - # Before state: + + # Before state: # veos#show running-config | section prefix-list # ip prefix-list v401 # seq 25 deny 45.55.4.0/24 ge 32 @@ -1171,88 +965,63 @@ Examples # seq 10 deny 10.1.1.0/24 # veos# - - name: Delete device configuration - arista.eos.eos_prefix_lists: - state: deleted + - name: Delete device configuration + arista.eos.eos_prefix_lists: + state: deleted + + + # Task Output + # ------------- + # before: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # - action: permit + # address: 30.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 300 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # sequence: 10 + # name: v403 + # commands: + # - no ip prefix-list v401 + # - no ip prefix-list v402 + # - no ip prefix-list v403 + # after: {} # After State: # veos#show running-config | section prefix-list # veos# - # - # Module Execution: - # "after": {}, - # "before": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # }, - # { - # "action": "permit", - # "address": "30.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 300 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "sequence": 10 - # } - # ], - # "name": "v403" - # } - # ] - # } - # ], - # "changed": true, - # "commands": [ - # "no ip prefix-list v401", - # "no ip prefix-list v402", - # "no ip prefix-list v403" - # ], - # + # Using parsed: + + # parse_prefix_lists.cfg # ip prefix-list v401 # seq 25 deny 45.55.4.0/24 @@ -1264,99 +1033,81 @@ Examples # ipv6 prefix-list v601 # seq 125 deny 5000:1::/64 # - - name: parse configs - arista.eos.eos_prefix_lists: - running_config: "{{ lookup('file', './parsed_prefix_lists.cfg') }}" - state: parsed - - # Module Execution: - # "parsed": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "sequence": 10 - # } - # ], - # "name": "v402" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ] + + + - name: parse configs + arista.eos.eos_prefix_lists: + running_config: "{{ lookup('file', './parsed_prefix_lists.cfg') }}" + state: parsed + + + # Task Output + # ------------- + # parsed: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # sequence: 10 + # name: v402 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 + # Using rendered: - - name: Render provided configuration - arista.eos.eos_prefix_lists: - config: - - afi: "ipv4" - prefix_lists: - - name: "v401" - entries: - - sequence: 25 - action: "deny" - address: "45.55.4.0/24" - - sequence: 200 - action: "permit" - address: "200.11.2.0/24" - match: - masklen: 32 - operator: "ge" - - name: "v403" - entries: - - action: "deny" - address: "10.1.1.0/24" - sequence: 10 - state: rendered - - # Module Execution: - # "rendered": [ - # "ip prefix-list v401", - # "seq 25 deny 45.55.4.0/24", - # "seq 200 permit 200.11.2.0/24 ge 32", - # "ip prefix-list v403", - # "seq 10 deny 10.1.1.0/24" - # ] - # + + - name: Render provided configuration + arista.eos.eos_prefix_lists: + config: + - afi: "ipv4" + prefix_lists: + - name: "v401" + entries: + - sequence: 25 + action: "deny" + address: "45.55.4.0/24" + - sequence: 200 + action: "permit" + address: "200.11.2.0/24" + match: + masklen: 32 + operator: "ge" + - name: "v403" + entries: + - action: "deny" + address: "10.1.1.0/24" + sequence: 10 + state: rendered + + # Task Output + # ------------- + # rendered: + # - ip prefix-list v401 + # - seq 25 deny 45.55.4.0/24 + # - seq 200 permit 200.11.2.0/24 ge 32 + # - ip prefix-list v403 + # - seq 10 deny 10.1.1.0/24 # using gathered: + + # Device config: # veos#show running-config | section prefix-list # ip prefix-list v401 @@ -1370,70 +1121,163 @@ Examples # seq 125 deny 5000:1::/64 # veos# - - name: gather configs - arista.eos.eos_prefix_lists: - state: gathered + - name: gather configs + arista.eos.eos_prefix_lists: + state: gathered - # Module Execution: - # - # "gathered": [ - # { - # "afi": "ipv4", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "45.55.4.0/24", - # "sequence": 25 - # }, - # { - # "action": "permit", - # "address": "11.11.2.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 100 - # } - # ], - # "name": "v401" - # }, - # { - # "entries": [ - # { - # "action": "deny", - # "address": "10.1.1.0/24", - # "match": { - # "masklen": 32, - # "operator": "ge" - # }, - # "sequence": 10 - # } - # ], - # "name": "v402" - # } - # ] - # }, - # { - # "afi": "ipv6", - # "prefix_lists": [ - # { - # "entries": [ - # { - # "action": "deny", - # "address": "5000:1::/64", - # "sequence": 125 - # } - # ], - # "name": "v601" - # } - # ] - # } - # ], + # Task Output + # ------------- + # gathered: + # - afi: ipv4 + # prefix_lists: + # - entries: + # - action: deny + # address: 45.55.4.0/24 + # sequence: 25 + # - action: permit + # address: 11.11.2.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 100 + # name: v401 + # - entries: + # - action: deny + # address: 10.1.1.0/24 + # match: + # masklen: 32 + # operator: ge + # sequence: 10 + # name: v402 + # - afi: ipv6 + # prefix_lists: + # - entries: + # - action: deny + # address: 5000:1::/64 + # sequence: 125 + # name: v601 +Return Values +------------- +Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: + +.. raw:: html + + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Key</th> + <th>Returned</th> + <th width="100%">Description</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>after</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>when changed</td> + <td> + <div>The resulting configuration model invocation.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format + of the parameters above.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>before</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>always</td> + <td> + <div>The configuration prior to the model invocation.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format + of the parameters above.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>commands</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>always</td> + <td> + <div>The set of commands pushed to the remote device.</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['ip prefix-list v401', 'seq 25 deny 45.55.4.0/24', 'seq 200 permit 200.11.2.0/24 ge 32', 'ip prefix-list v403', 'seq 10 deny 10.1.1.0/24']</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>gathered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>When <code>state</code> is <em>gathered</em></td> + <td> + <div>The configuration as structured data transformed for the running configuration fetched from remote host</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>parsed</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>When <code>state</code> is <em>parsed</em></td> + <td> + <div>The configuration as structured data transformed for the value of <code>running_config</code> option</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format of the parameters above.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>rendered</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">list</span> + </div> + </td> + <td>When <code>state</code> is <em>rendered</em></td> + <td> + <div>The set of CLI commands generated from the value in <code>config</code> option</div> + <br/> + <div style="font-size: smaller"><b>Sample:</b></div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">- ip prefix-list v401 - seq 25 deny 45.55.4.0/24 - seq 200 permit 200.11.2.0/24 ge 32 - ip prefix-list v403 - seq 10 deny 10.1.1.0/24</div> + </td> + </tr> + </table> + <br/><br/> + Status ------ diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_route_maps_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_route_maps_module.rst index f194b20b5..698ceea56 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_route_maps_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_route_maps_module.rst @@ -2621,7 +2621,7 @@ Parameters </ul> </td> <td> - <div>if True, overwrite existing config.</div> + <div>if true, overwrite existing config.</div> </td> </tr> <tr> @@ -2800,39 +2800,39 @@ Examples # veos#show running-config | section route-map # veos# - - name: Merge provided configuration with device configuration - arista.eos.eos_route_maps: - config: - - route_map: "mapmerge" - entries: - - description: "merged_map" - action: "permit" - sequence: 10 - match: - router_id: 22 - - description: "newmap" - action: "deny" - sequence: 25 - continue_sequence: 45 - match: - interface: "Ethernet1" - - route_map: "mapmerge2" - entries: - - sub_route_map: - name: "mapmerge" - action: "deny" - sequence: 45 - set: - metric: - value: 25 - add: "igp-metric" - as_path: - prepend: - last_as: 2 - match: - ipv6: - resolved_next_hop: "list1" - state: merged + - name: Merge provided configuration with device configuration + arista.eos.eos_route_maps: + config: + - route_map: "mapmerge" + entries: + - description: "merged_map" + action: "permit" + sequence: 10 + match: + router_id: 22 + - description: "newmap" + action: "deny" + sequence: 25 + continue_sequence: 45 + match: + interface: "Ethernet1" + - route_map: "mapmerge2" + entries: + - sub_route_map: + name: "mapmerge" + action: "deny" + sequence: 45 + set: + metric: + value: 25 + add: "igp-metric" + as_path: + prepend: + last_as: 2 + match: + ipv6: + resolved_next_hop: "list1" + state: merged # After State: @@ -2855,7 +2855,6 @@ Examples # route-map test permit 10 # veos# - # Module Execution: # "after": [ @@ -2950,26 +2949,26 @@ Examples # ! # veos# - - name: Replace - arista.eos.eos_route_maps: - config: - - route_map: "mapmerge" - entries: - - action: "permit" - sequence: 10 - match: - ipv6: - resolved_next_hop: "listr" - - action: "deny" - sequence: 90 - set: - extcommunity: - rt: - vpn: "22:11" - delete: True - ip: - unchanged: True - state: replaced + - name: Replace + arista.eos.eos_route_maps: + config: + - route_map: "mapmerge" + entries: + - action: "permit" + sequence: 10 + match: + ipv6: + resolved_next_hop: "listr" + - action: "deny" + sequence: 90 + set: + extcommunity: + rt: + vpn: "22:11" + delete: true + ip: + unchanged: true + state: replaced # After State: @@ -3161,22 +3160,22 @@ Examples # route-map test permit 10 # veos# - - name: Override - arista.eos.eos_route_maps: - config: - - route_map: "mapmerge" - entries: - - action: "permit" - sequence: 10 - match: - ipv6: - resolved_next_hop: "listr" - - action: "deny" - sequence: 90 - set: - metric: - igp_param: "igp-nexthop-cost" - state: overridden + - name: Override + arista.eos.eos_route_maps: + config: + - route_map: "mapmerge" + entries: + - action: "permit" + sequence: 10 + match: + ipv6: + resolved_next_hop: "listr" + - action: "deny" + sequence: 90 + set: + metric: + igp_param: "igp-nexthop-cost" + state: overridden # After State: @@ -3326,14 +3325,14 @@ Examples # set as-path prepend last-as 2 # veos# - - name: Delete route-map - arista.eos.eos_route_maps: - config: - - route_map: "mapmerge" - state: deleted - become: yes - tags: - - deleted1 + - name: Delete route-map + arista.eos.eos_route_maps: + config: + - route_map: "mapmerge" + state: deleted + become: true + tags: + - deleted1 # After State: @@ -3467,11 +3466,13 @@ Examples # set as-path prepend last-as 2 # veos# - - name: Delete all route-maps - arista.eos.eos_route_maps: - state: deleted + - name: Delete all route-maps + arista.eos.eos_route_maps: + state: deleted # After State: + # ------------ + # veos#show running-config | section route-map # veos# # @@ -3557,9 +3558,9 @@ Examples # set as-path prepend last-as 2 # veos# - - name: gather configs - arista.eos.eos_route_maps: - state: gathered + - name: gather configs + arista.eos.eos_route_maps: + state: gathered # Module Execution: # "gathered": [ @@ -3617,43 +3618,45 @@ Examples # Using rendered: - - name: Render provided configuration - arista.eos.eos_route_maps: - config: - - route_map: "mapmerge" - entries: - - description: "merged_map" - action: "permit" - sequence: 10 - match: - router_id: 22 - set: - bgp: 20 - - description: "newmap" - action: "deny" - sequence: 25 - continue_sequence: 45 - match: - interface: "Ethernet1" - - route_map: "mapmerge2" - entries: - - sub_route_map: - name: "mapmerge" - action: "deny" - sequence: 45 - set: - metric: - value: 25 - add: "igp-metric" - as_path: - prepend: - last_as: 2 - match: - ipv6: - resolved_next_hop: "list1" - state: rendered + - name: Render provided configuration + arista.eos.eos_route_maps: + config: + - route_map: "mapmerge" + entries: + - description: "merged_map" + action: "permit" + sequence: 10 + match: + router_id: 22 + set: + bgp: 20 + - description: "newmap" + action: "deny" + sequence: 25 + continue_sequence: 45 + match: + interface: "Ethernet1" + - route_map: "mapmerge2" + entries: + - sub_route_map: + name: "mapmerge" + action: "deny" + sequence: 45 + set: + metric: + value: 25 + add: "igp-metric" + as_path: + prepend: + last_as: 2 + match: + ipv6: + resolved_next_hop: "list1" + state: rendered + + # Task output: + # ------------ - # Module Execution: # "rendered": [ # "route-map mapmerge permit 10", # "match router-id prefix-list 22", @@ -3689,10 +3692,10 @@ Examples # set metric 25 +igp-metric # set as-path prepend last-as 2 - - name: parse configs - arista.eos.eos_route_maps: - running_config: "{{ lookup('file', './parsed.cfg') }}" - state: parsed + - name: parse configs + arista.eos.eos_route_maps: + running_config: "{{ lookup('file', './parsed.cfg') }}" + state: parsed # Module Execution: # "parsed": [ diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_snmp_server_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_snmp_server_module.rst index f66b77d33..c696a5b5c 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_snmp_server_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_snmp_server_module.rst @@ -819,7 +819,7 @@ Parameters <td> </td> <td> - <div>when True Disable implementation of a group of objects</div> + <div>when true Disable implementation of a group of objects</div> </td> </tr> <tr> @@ -3154,57 +3154,58 @@ Examples .. code-block:: yaml # Using merged: + # Before State # eos#show running-config | section snmp-server # eos# - - name: merge given snmp_server configuration - arista.eos.eos_snmp_server: - config: - communities: - - name: "comm3" - acl_v6: "list1" - view: "view1" - - name: "comm4" - acl_v4: "list3" - view: "view1" - - name: "comm5" - acl_v4: "list4" - ro: True - contact: "admin" - engineid: - remote: - host: 1.1.1.1 - id: "1234567" - groups: - - group: "group1" - version: "v1" - read: "view1" - - group: "group2" - version: "v3" - auth_privacy: "priv" - notify: "view1" - write: "view2" - hosts: - - host: "host02" - user: "user01" - udp_port: 23 - version: "2c" - - host: "host01" - user: "user01" - udp_port: 23 - version: "3 priv" - traps: - capacity: - arista_hardware_utilization_alert: True - bgp: - enabled: True - external_alarm: - arista_external_alarm_deasserted_notif: True - arista_external_alarm_asserted_notif: True - vrfs: - - vrf: "vrf01" - local_interface: "Ethernet1" + - name: merge given snmp_server configuration + arista.eos.eos_snmp_server: + config: + communities: + - name: "comm3" + acl_v6: "list1" + view: "view1" + - name: "comm4" + acl_v4: "list3" + view: "view1" + - name: "comm5" + acl_v4: "list4" + ro: true + contact: "admin" + engineid: + remote: + host: 1.1.1.1 + id: "1234567" + groups: + - group: "group1" + version: "v1" + read: "view1" + - group: "group2" + version: "v3" + auth_privacy: "priv" + notify: "view1" + write: "view2" + hosts: + - host: "host02" + user: "user01" + udp_port: 23 + version: "2c" + - host: "host01" + user: "user01" + udp_port: 23 + version: "3 priv" + traps: + capacity: + arista_hardware_utilization_alert: true + bgp: + enabled: true + external_alarm: + arista_external_alarm_deasserted_notif: true + arista_external_alarm_asserted_notif: true + vrfs: + - vrf: "vrf01" + local_interface: "Ethernet1" # After state # eos#show running-config | section snmp-server @@ -3311,6 +3312,7 @@ Examples # # Using replaced: + # Before State: # eos#show running-config | section snmp-server # snmp-server community comm3 view view1 ipv6 list1 @@ -3326,29 +3328,29 @@ Examples # snmp-server enable traps capacity arista-hardware-utilization-alert # snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif - - name: Replace given snmp_server configuration - become: true - register: result - arista.eos.eos_snmp_server: &replaced - state: replaced - config: - communities: - - name: "comm3" - acl_v6: "list1" - view: "view1" - - name: "replacecomm" - acl_v4: "list4" - extension: - root_oid: "123456" - script_location: "flash:" - traps: - test: - arista_test_notification: True - bgp: - enabled: True - vrfs: - - vrf: "vrf_replace" - local_interface: "Ethernet1" + - name: Replace given snmp_server configuration + become: true + register: result + arista.eos.eos_snmp_server: &replaced + state: replaced + config: + communities: + - name: "comm3" + acl_v6: "list1" + view: "view1" + - name: "replacecomm" + acl_v4: "list4" + extension: + root_oid: "123456" + script_location: "flash:" + traps: + test: + arista_test_notification: true + bgp: + enabled: true + vrfs: + - vrf: "vrf_replace" + local_interface: "Ethernet1" # After State: @@ -3497,27 +3499,27 @@ Examples # snmp-server enable traps capacity arista-hardware-utilization-alert # snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif - - name: Override given snmp_server configuration - arista.eos.eos_snmp_server: - state: overridden - config: - communities: - - name: "comm3" - acl_v6: "list1" - view: "view1" - - name: "replacecomm" - acl_v4: "list4" - extension: - root_oid: "123456" - script_location: "flash:" - traps: - test: - arista_test_notification: True - bgp: - enabled: True - vrfs: - - vrf: "vrf_replace" - local_interface: "Ethernet1" + - name: Override given snmp_server configuration + arista.eos.eos_snmp_server: + state: overridden + config: + communities: + - name: "comm3" + acl_v6: "list1" + view: "view1" + - name: "replacecomm" + acl_v4: "list4" + extension: + root_oid: "123456" + script_location: "flash:" + traps: + test: + arista_test_notification: true + bgp: + enabled: true + vrfs: + - vrf: "vrf_replace" + local_interface: "Ethernet1" # After State: @@ -3666,9 +3668,9 @@ Examples # snmp-server enable traps capacity arista-hardware-utilization-alert # snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif - - name: Delete given snmp_server configuration - arista.eos.eos_snmp_server: - state: deleted + - name: Delete given snmp_server configuration + arista.eos.eos_snmp_server: + state: deleted # After State: # eos#show running-config | section snmp-server @@ -3778,10 +3780,10 @@ Examples # snmp-server enable traps external-alarm arista-external-alarm-asserted-notif # snmp-server enable traps external-alarm arista-external-alarm-deasserted-notif - - name: Provide the running configuration for parsing (config to be parsed) - arista.eos.eos_snmp_server: - running_config: "{{ lookup('file', '_parsed.cfg') }}" - state: parsed + - name: Provide the running configuration for parsing (config to be parsed) + arista.eos.eos_snmp_server: + running_config: "{{ lookup('file', '_parsed.cfg') }}" + state: parsed # Module Execution: # "parsed": { @@ -3854,54 +3856,54 @@ Examples # } # Using rendered: - - name: Render given snmp_server configuration - arista.eos.eos_snmp_server: - state: "rendered" - config: - communities: - - name: "comm3" - acl_v6: "list1" - view: "view1" - - name: "comm4" - acl_v4: "list3" - view: "view1" - - name: "comm5" - acl_v4: "list4" - ro: True - contact: "admin" - engineid: - remote: - host: 1.1.1.1 - id: "1234567" - groups: - - group: "group1" - version: "v1" - read: "view1" - - group: "group2" - version: "v3" - auth_privacy: "priv" - notify: "view1" - write: "view2" - hosts: - - host: "host02" - user: "user01" - udp_port: 23 - version: "2c" - - host: "host01" - user: "user01" - udp_port: 23 - version: "3 priv" - traps: - capacity: - arista_hardware_utilization_alert: True - bgp: - enabled: True - external_alarm: - arista_external_alarm_deasserted_notif: True - arista_external_alarm_asserted_notif: True - vrfs: - - vrf: "vrf01" - local_interface: "Ethernet1" + - name: Render given snmp_server configuration + arista.eos.eos_snmp_server: + state: "rendered" + config: + communities: + - name: "comm3" + acl_v6: "list1" + view: "view1" + - name: "comm4" + acl_v4: "list3" + view: "view1" + - name: "comm5" + acl_v4: "list4" + ro: true + contact: "admin" + engineid: + remote: + host: 1.1.1.1 + id: "1234567" + groups: + - group: "group1" + version: "v1" + read: "view1" + - group: "group2" + version: "v3" + auth_privacy: "priv" + notify: "view1" + write: "view2" + hosts: + - host: "host02" + user: "user01" + udp_port: 23 + version: "2c" + - host: "host01" + user: "user01" + udp_port: 23 + version: "3 priv" + traps: + capacity: + arista_hardware_utilization_alert: true + bgp: + enabled: true + external_alarm: + arista_external_alarm_deasserted_notif: true + arista_external_alarm_asserted_notif: true + vrfs: + - vrf: "vrf01" + local_interface: "Ethernet1" # Module Execution: # "rendered": [ @@ -3936,10 +3938,10 @@ Examples # snmp-server enable traps capacity arista-hardware-utilization-alert # snmp-server enable traps external-alarm arista-external-alarm-asserted-notif arista-external-alarm-deasserted-notif - - name: Gathered the provided configuration with the exisiting running configuration - arista.eos.eos_snmp_server: - config: - state: gathered + - name: Gathered the provided configuration with the exisiting running configuration + arista.eos.eos_snmp_server: + config: + state: gathered # Module Execution: # "gathered": { diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_static_routes_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_static_routes_module.rst index 253d331b4..ab32b25a8 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_static_routes_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_static_routes_module.rst @@ -420,204 +420,83 @@ Examples # ipv6 route vrf testvrf 2222:6::/64 Null0 90 name testroute1 # veos(config)# + - name: Delete afi arista.eos.eos_static_routes: config: - - vrf: testvrf - address_families: - - afi: ipv4 + - vrf: testvrf + address_families: + - afi: ipv4 state: deleted - # "after": [ - # { - # "address_families": [ - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5222:5::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "2222:6::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # }, - # { - # "admin_distance": 55, - # "interface": "Ethernet1" - # }, - # { - # "admin_distance": 90, - # "description": "testroute1", - # "interface": "Null0" - # } - # ] - # } - # ] - # } - # ], - # "vrf": "testvrf" - # } - # ], - # "before": [ - # { - # "address_families": [ - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5222:5::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "22.65.1.0/24", - # "next_hops": [ - # { - # "admin_distance": 90, - # "description": "testroute", - # "interface": "Null0" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "2222:6::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # }, - # { - # "admin_distance": 55, - # "interface": "Ethernet1" - # }, - # { - # "admin_distance": 90, - # "description": "testroute1", - # "interface": "Null0" - # } - # ] - # } - # ] - # } - # ], - # "vrf": "testvrf" - # } - # ], - # "changed": true, - # "commands": [ - # "no ip route vrf testvrf 22.65.1.0/24 Null0 90 name testroute" - # ], + + # Task Output + # ------------- + # before: + # - address_families: + # - afi: ipv6 + # routes: + # - dest: 5222:5::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 22.65.1.0/24 + # next_hops: + # - admin_distance: 90 + # description: testroute + # interface: Null0 + # - afi: ipv6 + # routes: + # - dest: 2222:6::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - admin_distance: 55 + # interface: Ethernet1 + # - admin_distance: 90 + # description: testroute1 + # interface: Null0 + # vrf: testvrf + # commands: + # - no ip route vrf testvrf 22.65.1.0/24 Null0 90 name testroute + # after: + # - address_families: + # - afi: ipv6 + # routes: + # - dest: 5222:5::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - address_families: + # - afi: ipv6 + # routes: + # - dest: 2222:6::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - admin_distance: 55 + # interface: Ethernet1 + # - admin_distance: 90 + # description: testroute1 + # interface: Null0 + # vrf: testvrf + # After State # ___________ - # veos(config)#show running-config | grep route # ipv6 route 5222:5::/64 Management1 4312:100::1 # ipv6 route vrf testvrf 2222:6::/64 Management1 4312:100::1 # ipv6 route vrf testvrf 2222:6::/64 Ethernet1 55 # ipv6 route vrf testvrf 2222:6::/64 Null0 90 name testroute1 - # + # Using merged - # Before : [ - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "165.10.1.0/24", - # "next_hops": [ - # { - # "admin_distance": 100, - # "interface": "Ethernet1" - # } - # ] - # }, - # { - # "dest": "172.17.252.0/24", - # "next_hops": [ - # { - # "nexthop_grp": "testgroup" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5001::/64", - # "next_hops": [ - # { - # "admin_distance": 50, - # "interface": "Ethernet1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "130.1.122.0/24", - # "next_hops": [ - # { - # "interface": "Ethernet1", - # "tag": 50 - # } - # ] - # } - # ] - # } - # ], - # "vrf": "testvrf" - # } - # ] - # + # Before State # ------------- # veos(config)#show running-config | grep "route" @@ -627,99 +506,84 @@ Examples # ipv6 route 5001::/64 Ethernet1 50 # veos(config)# + - name: Merge new static route configuration arista.eos.eos_static_routes: config: - - vrf: testvrf - address_families: - - afi: ipv6 - routes: - - dest: 2211::0/64 - next_hop: - - forward_router_address: 100:1::2 - interface: Ethernet1 + - vrf: testvrf + address_families: + - afi: ipv6 + routes: + - dest: 2211::0/64 + next_hop: + - forward_router_address: 100:1::2 + interface: Ethernet1 state: merged + + # Task Output + # ------------- + # before: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 165.10.1.0/24 + # next_hops: + # - admin_distance: 100 + # interface: Ethernet1 + # - dest: 172.17.252.0/24 + # next_hops: + # - nexthop_grp: testgroup + # - afi: ipv6 + # routes: + # - dest: 5001::/64 + # next_hops: + # - admin_distance: 50 + # interface: Ethernet1 + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 130.1.122.0/24 + # next_hops: + # - interface: Ethernet1 + # tag: 50 + # vrf: testvrf + # commands: + # - ipv6 route 2211::/64 Ethernet1 100:1::2 + # after: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 165.10.1.0/24 + # next_hops: + # - admin_distance: 100 + # interface: Ethernet1 + # - dest: 172.17.252.0/24 + # next_hops: + # - nexthop_grp: testgroup + # - afi: ipv6 + # routes: + # - dest: 5001::/64 + # next_hops: + # - admin_distance: 50 + # interface: Ethernet1 + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 130.1.122.0/24 + # next_hops: + # - interface: Ethernet1 + # tag: 50 + # - afi: ipv6 + # routes: + # - dest: 2211::0/64 + # next_hops: + # - aforward_router_address: "100:1::2" + # interface: Ethernet1 + # vrf: testvrf + # After State # ----------- - - #After [ - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "165.10.1.0/24", - # "next_hops": [ - # { - # "admin_distance": 100, - # "interface": "Ethernet1" - # } - # ] - # }, - # { - # "dest": "172.17.252.0/24", - # "next_hops": [ - # { - # "nexthop_grp": "testgroup" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5001::/64", - # "next_hops": [ - # { - # "admin_distance": 50, - # "interface": "Ethernet1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "130.1.122.0/24", - # "next_hops": [ - # { - # "interface": "Ethernet1", - # "tag": 50 - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "2211::0/64", - # "next_hops": [ - # { - # "aforward_router_address": 100:1::2 - # "interface": "Ethernet1" - # } - # ] - # } - # ] - # } - - # ], - # "vrf": "testvrf" - # } - # ] - # # veos(config)#show running-config | grep "route" # ip route 165.10.1.0/24 Ethernet1 100 # ip route 172.17.252.0/24 Nexthop-Group testgroup @@ -734,68 +598,6 @@ Examples # Before State # ------------- - - # "before": [ - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "165.10.1.0/24", - # "next_hops": [ - # { - # "admin_distance": 100, - # "interface": "Ethernet1" - # } - # ] - # }, - # { - # "dest": "172.17.252.0/24", - # "next_hops": [ - # { - # "nexthop_grp": "testgroup" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5001::/64", - # "next_hops": [ - # { - # "admin_distance": 50, - # "interface": "Ethernet1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "130.1.122.0/24", - # "next_hops": [ - # { - # "interface": "Ethernet1", - # "tag": 50 - # } - # ] - # } - # ] - # } - # ], - # "vrf": "testvrf" - # } - # ] # veos(config)#show running-config | grep "route" # ip route 165.10.1.0/24 Ethernet1 100 # ip route 172.17.252.0/24 Nexthop-Group testgroup @@ -803,39 +605,63 @@ Examples # ipv6 route 5001::/64 Ethernet1 50 # veos(config)# + - name: Overridden static route configuration arista.eos.eos_static_routes: config: - - address_families: - - afi: ipv4 - routes: - - dest: 10.2.2.0/24 - next_hop: - - interface: Ethernet1 + - address_families: + - afi: ipv4 + routes: + - dest: 10.2.2.0/24 + next_hop: + - interface: Ethernet1 state: replaced + + # Task Output + # ------------- + # before: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 165.10.1.0/24 + # next_hops: + # - admin_distance: 100 + # interface: Ethernet1 + # - dest: 172.17.252.0/24 + # next_hops: + # - nexthop_grp: testgroup + # - afi: ipv6 + # routes: + # - dest: 5001::/64 + # next_hops: + # - admin_distance: 50 + # interface: Ethernet1 + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 130.1.122.0/24 + # next_hops: + # - interface: Ethernet1 + # tag: 50 + # vrf: testvrf + # commands: + # - no ip route 165.10.1.0/24 Ethernet1 100 + # - no ip route 172.17.252.0/24 Nexthop-Group testgroup + # - no ip route vrf testvrf 130.1.122.0/24 Ethernet1 tag 50 + # - no ipv6 route 5001::/64 Ethernet1 50 + # - ip route 10.2.2.0/24 Ethernet1 + # after: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 10.2.2.0/24 + # next_hops: + # - interface: Ethernet1 + + # After State # ----------- - - # "after": [ - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "10.2.2.0/24", - # "next_hops": [ - # { - # "interface": "Ethernet1" - # } - # ] - # } - # ] - # } - # ] - # } - # ] # veos(config)#show running-config | grep "route" # ip route 10.2.2.0/24 Ethernet1 # veos(config)# @@ -845,7 +671,6 @@ Examples # Before State # ------------- - # ip route 10.2.2.0/24 Ethernet1 # ip route 10.2.2.0/24 64.1.1.1 label 17 33 # ip route 33.33.33.0/24 Nexthop-Group testgrp @@ -855,108 +680,102 @@ Examples # ipv6 route vrf testvrf 2222:6::/64 Ethernet1 55 # ipv6 route vrf testvrf 2222:6::/64 Null0 90 name testroute1 - # [ - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "10.2.2.0/24", - # "next_hops": [ - # { - # "interface": "Ethernet1" - # }, - # { - # "admin_distance": 33, - # "interface": "64.1.1.1", - # "mpls_label": 17 - # } - # ] - # }, - # { - # "dest": "33.33.33.0/24", - # "next_hops": [ - # { - # "nexthop_grp": "testgrp" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5222:5::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "22.65.1.0/24", - # "next_hops": [ - # { - # "admin_distance": 90, - # "description": "testroute", - # "interface": "Null0" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "2222:6::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # }, - # { - # "admin_distance": 90, - # "description": "testroute1", - # "interface": "Null0" - # } - # ] - # } - # ] - # } - # ], - # "vrf": "testvrf" - # } - # ] - name: Replace nexthop arista.eos.eos_static_routes: config: - - vrf: testvrf - address_families: - - afi: ipv6 - routes: - - dest: 2222:6::/64 - next_hops: - - admin_distance: 55 - interface: Ethernet1 + - vrf: testvrf + address_families: + - afi: ipv6 + routes: + - dest: 2222:6::/64 + next_hops: + - admin_distance: 56 + interface: Ethernet1 state: replaced + + # Task Output + # ------------- + # before: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 10.2.2.0/24 + # next_hops: + # - interface: Ethernet1 + # - admin_distance: 33 + # interface: 64.1.1.1 + # mpls_label: 17 + # - dest: 33.33.33.0/24 + # next_hops: + # - nexthop_grp: testgrp + # - afi: ipv6 + # routes: + # - dest: 5222:5::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 22.65.1.0/24 + # next_hops: + # - admin_distance: 90 + # description: testroute + # interface: Null0 + # - afi: ipv6 + # routes: + # - dest: 2222:6::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - admin_distance: 90 + # description: testroute1 + # interface: Null0 + # vrf: testvrf + # commands: + # - no ipv6 route vrf testvrf 2222:6::/64 Management1 4312:100::1 + # - no ipv6 route vrf testvrf 2222:6::/64 Ethernet1 55 + # - no ipv6 route vrf testvrf 2222:6::/64 Null0 90 name testroute1 + # - ipv6 route vrf testvrf 2222:6::/64 Ethernet1 56 + # after: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 10.2.2.0/24 + # next_hops: + # - interface: Ethernet1 + # - admin_distance: 33 + # interface: 64.1.1.1 + # mpls_label: 17 + # - dest: 33.33.33.0/24 + # next_hops: + # - nexthop_grp: testgrp + # - afi: ipv6 + # routes: + # - dest: 5222:5::/64 + # next_hops: + # - forward_router_address: 4312:100::1 + # interface: Management1 + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 22.65.1.0/24 + # next_hops: + # - admin_distance: 90 + # description: testroute + # interface: Null0 + # - afi: ipv6 + # routes: + # - dest: 2222:6::/64 + # next_hops: + # - admin_distance: 56 + # interface: Ethernet1 + # vrf: testvrf + # After State # ----------- - # veos(config)#show running-config | grep route # ip route 10.2.2.0/24 Ethernet1 # ip route 10.2.2.0/24 64.1.1.1 label 17 33 @@ -965,86 +784,9 @@ Examples # ipv6 route 5222:5::/64 Management1 4312:100::1 # ipv6 route vrf testvrf 2222:6::/64 Ethernet1 55 - # "after": [ - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "10.2.2.0/24", - # "next_hops": [ - # { - # "interface": "Ethernet1" - # }, - # { - # "admin_distance": 33, - # "interface": "64.1.1.1", - # "mpls_label": 17 - # } - # ] - # }, - # { - # "dest": "33.33.33.0/24", - # "next_hops": [ - # { - # "nexthop_grp": "testgrp" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "5222:5::/64", - # "next_hops": [ - # { - # "forward_router_address": "4312:100::1", - # "interface": "Management1" - # } - # ] - # } - # ] - # } - # ] - # }, - # { - # "address_families": [ - # { - # "afi": "ipv4", - # "routes": [ - # { - # "dest": "22.65.1.0/24", - # "next_hops": [ - # { - # "admin_distance": 90, - # "description": "testroute", - # "interface": "Null0" - # } - # ] - # } - # ] - # }, - # { - # "afi": "ipv6", - # "routes": [ - # { - # "dest": "2222:6::/64", - # "next_hops": [ - # { - # "admin_distance": 55, - # "interface": "Ethernet1" - # } - # ] - # } - # ] - # } - # ], - # "vrf": "testvrf" - # } - # ] + + # Using Gathered + # Before State # ------------- @@ -1058,22 +800,22 @@ Examples arista.eos.eos_static_routes: state: gathered - # returns : - # arista.eos.eos_static_routes: - # config: - # - address_families: - # - afi: ipv4 - # routes: - # - dest: 165.10.1.0/24 - # next_hop: - # - forward_router_address: 10.1.1.2 - # interface: "Ethernet1" - # admin_distance: 100 - # - afi: ipv6 - # routes: - # - dest: 5001::/64 - # next_hop: - # - interface: "Ethernet1" + # Task Output + # ------------- + # gathered: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 165.10.1.0/24 + # next_hop: + # - forward_router_address: 10.1.1.2 + # interface: Ethernet1 + # admin_distance: 100 + # - afi: ipv6 + # routes: + # - dest: 5001::/64 + # next_hop: + # - interface: Ethernet1 # Using rendered @@ -1094,10 +836,45 @@ Examples # next_hop: # - interface: "Ethernet1" - # returns: + # Task Output + # ------------- + # rendered: + # - ip route 165.10.1.0/24 Ethernet1 10.1.1.2 100 + # - ipv6 route 5001::/64 Ethernet1 + + + # Using parsed: + + + # parse_static_routes.cfg # ip route 165.10.1.0/24 Ethernet1 10.1.1.2 100 # ipv6 route 5001::/64 Ethernet1 + # + + + - name: parse configs + arista.eos.eos_static_routes: + running_config: "{{ lookup('file', './parse_static_routes.cfg') }}" + state: parsed + + + # Task Output + # ------------- + # parsed: + # - address_families: + # - afi: ipv4 + # routes: + # - dest: 165.10.1.0/24 + # next_hop: + # - forward_router_address: 10.1.1.2 + # interface: Ethernet1 + # admin_distance: 100 + # - afi: ipv6 + # routes: + # - dest: 5001::/64 + # next_hop: + # - interface: Ethernet1 @@ -1163,7 +940,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <div>The set of commands pushed to the remote device.</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['ip route vrf vrf1 192.2.2.0/24 125.2.3.1 93']</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['ip route vrf vrf1 192.2.2.0/24 125.2.3.1 93', 'ipv6 route 5001::/64 Ethernet1']</div> </td> </tr> <tr> @@ -1214,35 +991,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <div>The set of CLI commands generated from the value in <code>config</code> option</div> <br/> <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">"address_families": [ - { - "afi": "ipv4", - "routes": [ - { - "dest": "192.2.2.0/24", - "next_hops": [ - { - "admin_distance": 93, - "description": null, - "forward_router_address": null, - "interface": "125.2.3.1", - "mpls_label": null, - "nexthop_grp": null, - "tag": null, - "track": null, - "vrf": null - } - ] - } - ] - } - ], - "vrf": "vrf1" - } - ], - "running_config": null, - "state": "rendered" - }</div> + <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">- ip route 165.10.1.0/24 Ethernet1 10.1.1.2 100 - ipv6 route 5001::/64 Ethernet1</div> </td> </tr> </table> diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_system_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_system_module.rst index 3ec8dcdb9..12f080f75 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_system_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_system_module.rst @@ -164,22 +164,22 @@ Examples - name: configure DNS lookup sources with VRF support arista.eos.eos_system: lookup_source: - - interface: Management1 - vrf: mgmt - - interface: Ethernet1 - vrf: myvrf + - interface: Management1 + vrf: mgmt + - interface: Ethernet1 + vrf: myvrf - name: configure name servers arista.eos.eos_system: name_servers: - - 8.8.8.8 - - 8.8.4.4 + - 8.8.8.8 + - 8.8.4.4 - name: configure name servers with VRF support arista.eos.eos_system: name_servers: - - {server: 8.8.8.8, vrf: mgmt} - - {server: 8.8.4.4, vrf: mgmt} + - {server: 8.8.8.8, vrf: mgmt} + - {server: 8.8.4.4, vrf: mgmt} diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_user_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_user_module.rst index 16bedf51c..cc0aefdfa 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_user_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_user_module.rst @@ -367,13 +367,13 @@ Examples - name: remove all users except admin arista.eos.eos_user: - purge: yes + purge: true - name: set multiple users to privilege level 15 arista.eos.eos_user: aggregate: - - name: netop - - name: netend + - name: netop + - name: netend privilege: 15 state: present diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_vlans_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_vlans_module.rst index fc9714ccb..c6be2b9e0 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_vlans_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_vlans_module.rst @@ -177,7 +177,7 @@ Examples - name: Delete attributes of the given VLANs. arista.eos.eos_vlans: config: - - vlan_id: 20 + - vlan_id: 20 state: deleted # After state: @@ -203,8 +203,8 @@ Examples - name: Merge given VLAN attributes with device configuration arista.eos.eos_vlans: config: - - vlan_id: 20 - state: suspend + - vlan_id: 20 + state: suspend state: merged # After state: @@ -234,8 +234,8 @@ Examples - name: Override device configuration of all VLANs with provided configuration arista.eos.eos_vlans: config: - - vlan_id: 20 - state: suspend + - vlan_id: 20 + state: suspend state: overridden # After state: @@ -261,8 +261,8 @@ Examples - name: Replace all attributes of specified VLANs with provided configuration arista.eos.eos_vlans: config: - - vlan_id: 20 - state: suspend + - vlan_id: 20 + state: suspend state: replaced # After state: @@ -303,10 +303,10 @@ Examples - name: Use Rendered to convert the structured data to native config arista.eos.eos_vlans: config: - - vlan_id: 10 - name: ten - - vlan_id: 20 - state: suspend + - vlan_id: 10 + name: ten + - vlan_id: 20 + state: suspend state: rendered # Output: diff --git a/ansible_collections/arista/eos/docs/arista.eos.eos_vrf_module.rst b/ansible_collections/arista/eos/docs/arista.eos.eos_vrf_module.rst index dcde6db71..bf2351644 100644 --- a/ansible_collections/arista/eos/docs/arista.eos.eos_vrf_module.rst +++ b/ansible_collections/arista/eos/docs/arista.eos.eos_vrf_module.rst @@ -292,7 +292,7 @@ Examples name: test rd: 1:200 interfaces: - - Ethernet2 + - Ethernet2 state: present - name: Delete VRFs @@ -303,20 +303,20 @@ Examples - name: Create aggregate of VRFs with purge arista.eos.eos_vrf: aggregate: - - name: test4 - rd: 1:204 - - name: test5 - rd: 1:205 + - name: test4 + rd: 1:204 + - name: test5 + rd: 1:205 state: present - purge: yes + purge: true - name: Delete aggregate of VRFs arista.eos.eos_vrf: aggregate: - - name: test2 - - name: test3 - - name: test4 - - name: test5 + - name: test2 + - name: test3 + - name: test4 + - name: test5 state: absent |