|
|
@ -3,13 +3,6 @@
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
|
|
|
|
|
|
|
|
- set_fact: bidir="false"
|
|
|
|
|
|
|
|
when: platform is search('N3K')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- set_fact: bidircfg='bidir'
|
|
|
|
|
|
|
|
- set_fact: bidircfg=''
|
|
|
|
|
|
|
|
when: platform is search('N3K')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- block:
|
|
|
|
- name: "Disable feature PIM"
|
|
|
|
- name: "Disable feature PIM"
|
|
|
|
nxos_feature: &disable_feature
|
|
|
|
nxos_feature: &disable_feature
|
|
|
@ -27,7 +20,7 @@
|
|
|
|
nxos_pim_rp_address: &configgl
|
|
|
|
nxos_pim_rp_address: &configgl
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
group_list: "224.0.0.0/8"
|
|
|
|
group_list: "224.0.0.0/8"
|
|
|
|
bidir: "{{bidir|default('true')}}"
|
|
|
|
bidir: True
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
@ -44,86 +37,187 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + group_list using long config
|
|
|
|
- name: Configure rp_address + group_list remove bidir
|
|
|
|
#FIXME: Config deletion shall be fixed in 2.5 for platform dependencies.
|
|
|
|
nxos_pim_rp_address: &configglnb
|
|
|
|
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
# Note: For 2.4 - Use platform specific config delete command as shown below.
|
|
|
|
group_list: "224.0.0.0/8"
|
|
|
|
# Possible options: Identify and use the command that is supported
|
|
|
|
bidir: False
|
|
|
|
# by your platform under test.
|
|
|
|
state: present
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check idempotence rp_address + group_list remove bidir
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configglnb
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
# no ip pim rp-address <ip address> <group-list|prefix-list|route-map> bidir
|
|
|
|
- assert: *false
|
|
|
|
# no ip pim rp-address <ip address>
|
|
|
|
|
|
|
|
# no ip pim rp-address <ip address> <group-list|prefix-list|route-map>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nxos_config:
|
|
|
|
- name: Configure rp_address + bidir
|
|
|
|
lines: "no ip pim rp-address 10.1.1.20 group-list 224.0.0.0/8 {{ bidircfg }}"
|
|
|
|
nxos_pim_rp_address: &configbi
|
|
|
|
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
bidir: True
|
|
|
|
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check idempotence rp_address + bidir
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configbi
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + group_list using short config
|
|
|
|
- name: Configure rp_address remove bidir
|
|
|
|
nxos_config:
|
|
|
|
nxos_pim_rp_address: &confignbi
|
|
|
|
lines: no ip pim rp-address 10.1.1.20
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
bidir: False
|
|
|
|
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check idempotence rp_address remove bidir
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *confignbi
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + group_list
|
|
|
|
|
|
|
|
nxos_pim_rp_address: &configglr
|
|
|
|
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
group_list: "224.0.0.0/8"
|
|
|
|
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check remove idempotence rp_address + group_list
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configglr
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address
|
|
|
|
|
|
|
|
nxos_pim_rp_address: &configbir
|
|
|
|
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure rp_address + prefix_list
|
|
|
|
- name: Check remove idempotence rp_address
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configbir
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure rp_address + prefix_list + bidir
|
|
|
|
nxos_pim_rp_address: &configpl
|
|
|
|
nxos_pim_rp_address: &configpl
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
prefix_list: "pim_prefix_list"
|
|
|
|
prefix_list: "pim_prefix_list"
|
|
|
|
bidir: "{{bidir|default('true')}}"
|
|
|
|
bidir: True
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check idempotence rp_address + prefix_list
|
|
|
|
- name: Check idempotence rp_address + prefix_list + bidir
|
|
|
|
nxos_pim_rp_address: *configpl
|
|
|
|
nxos_pim_rp_address: *configpl
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + prefix_list using long config
|
|
|
|
- name: Configure rp_address + prefix_list
|
|
|
|
nxos_config:
|
|
|
|
nxos_pim_rp_address: &configplnbi
|
|
|
|
lines: "no ip pim rp-address 10.1.1.20 prefix-list pim_prefix_list {{ bidircfg }}"
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
prefix_list: "pim_prefix_list"
|
|
|
|
|
|
|
|
bidir: False
|
|
|
|
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check idempotence rp_address + prefix_list
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configplnbi
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + prefix_list using short config
|
|
|
|
- name: Remove rp_address + prefix_list
|
|
|
|
nxos_config:
|
|
|
|
nxos_pim_rp_address: &configplr
|
|
|
|
lines: no ip pim rp-address 10.1.1.20
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
prefix_list: "pim_prefix_list"
|
|
|
|
|
|
|
|
bidir: False
|
|
|
|
|
|
|
|
state: absent
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure rp_address + route_map
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check remove idempotence rp_address + prefix_list
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configplr
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure rp_address + route_map + bidir
|
|
|
|
nxos_pim_rp_address: &configrm
|
|
|
|
nxos_pim_rp_address: &configrm
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
route_map: "pim_routemap"
|
|
|
|
route_map: "pim_routemap"
|
|
|
|
bidir: "{{bidir|default('true')}}"
|
|
|
|
bidir: True
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check idempotence rp_address + route_map
|
|
|
|
- name: Check idempotence rp_address + route_map + bidir
|
|
|
|
nxos_pim_rp_address: *configrm
|
|
|
|
nxos_pim_rp_address: *configrm
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + route_map using long config
|
|
|
|
- name: Configure rp_address + route_map
|
|
|
|
nxos_config:
|
|
|
|
nxos_pim_rp_address: &configrmnbi
|
|
|
|
lines: "no ip pim rp-address 10.1.1.20 route-map pim_routemap {{ bidircfg }}"
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
route_map: "pim_routemap"
|
|
|
|
|
|
|
|
bidir: False
|
|
|
|
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + route_map using short config
|
|
|
|
- name: Check idempotence rp_address + route_map
|
|
|
|
nxos_config:
|
|
|
|
nxos_pim_rp_address: *configrmnbi
|
|
|
|
lines: no ip pim rp-address 10.1.1.20
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove rp_address + route_map
|
|
|
|
|
|
|
|
nxos_pim_rp_address: &configrmr
|
|
|
|
|
|
|
|
rp_address: "10.1.1.20"
|
|
|
|
|
|
|
|
route_map: "pim_routemap"
|
|
|
|
|
|
|
|
bidir: False
|
|
|
|
|
|
|
|
state: absent
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
ignore_errors: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check remove idempotence rp_address + route_map
|
|
|
|
|
|
|
|
nxos_pim_rp_address: *configrmr
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
|
|
|
|
always:
|
|
|
|
always:
|
|
|
|
- name: "Disable feature PIM"
|
|
|
|
- name: "Disable feature PIM"
|
|
|
|