--- - debug: msg: START vyos_bgp_address_family rtt integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - include_tasks: _preconfig.yaml - block: - name: Merge the provided configuration with the existing running configuration register: baseconfig vyos.vyos.vyos_bgp_address_family: config: as_number: "65536" address_family: - afi: "ipv6" redistribute: - protocol: "static" metric: 50 neighbors: - neighbor_address: "203.0.113.5" address_family: - afi: "ipv6" allowas_in: 4 attribute_unchanged: med: true default_originate: "map01" distribute_list: - action: "export" acl: 10 - neighbor_address: "192.0.2.25" address_family: - afi: "ipv6" maximum_prefix: 45 nexthop_self: true route_map: - action: "export" route_map: "map01" - action: "import" route_map: "map01" state: merged - vyos.vyos.vyos_facts: gather_network_resources: bgp_address_family - assert: that: - baseconfig.commands|length == 9 - baseconfig.changed == true - baseconfig.commands|symmetric_difference(merged.commands) == [] - baseconfig.after == ansible_facts['network_resources']['bgp_address_family'] - name: Apply the provided configuration (config to be reverted) register: result vyos.vyos.vyos_bgp_address_family: config: as_number: "65536" address_family: - afi: "ipv6" aggregate_address: - summary_only: true prefix: "21e0:1:1::/64" networks: - prefix: "21e0:1:1::/64" route_map: "map01" neighbors: - address_family: - afi: "ipv6" remove_private_as: true neighbor_address: "203.0.113.5" - name: Revert back to base config using facts round trip register: revert vyos.vyos.vyos_bgp_address_family: config: "{{ ansible_facts['network_resources']['bgp_address_family'] }}" state: overridden - name: Assert that config was reverted assert: that: baseconfig.after == revert.after always: - include_tasks: _remove_config.yaml