2018-01-22 06:00:52 +00:00
|
|
|
---
|
|
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_pim sanity test"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
|
|
|
|
- name: "Setup: Disable feature PIM"
|
|
|
|
nxos_feature: &disable_feature
|
|
|
|
feature: pim
|
2018-07-02 13:43:51 +00:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 06:00:52 +00:00
|
|
|
state: disabled
|
|
|
|
|
|
|
|
- name: "Setup: Enable feature PIM"
|
|
|
|
nxos_feature:
|
|
|
|
feature: pim
|
2018-07-02 13:43:51 +00:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 06:00:52 +00:00
|
|
|
state: enabled
|
|
|
|
|
|
|
|
- name: "Setup: Configure ssm_range none"
|
|
|
|
nxos_pim: &none
|
|
|
|
ssm_range: "none"
|
2018-07-02 13:43:51 +00:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 06:00:52 +00:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Configure ssm_range
|
|
|
|
nxos_pim: &configure
|
|
|
|
ssm_range:
|
|
|
|
- "239.128.1.0/24"
|
|
|
|
- "224.0.0.0/8"
|
2018-07-02 13:43:51 +00:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 06:00:52 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: Check idempotence
|
|
|
|
nxos_pim: *configure
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: Configure ssm_range default
|
|
|
|
nxos_pim: &conf_default
|
|
|
|
ssm_range: "default"
|
2018-07-02 13:43:51 +00:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 06:00:52 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
- name: Check idempotence
|
|
|
|
nxos_pim: *conf_default
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
- name: Configure ssm_range none
|
|
|
|
nxos_pim: *none
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
- name: Check idempotence
|
|
|
|
nxos_pim: *none
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
always:
|
|
|
|
- name: "Disable feature PIM"
|
|
|
|
nxos_feature: *disable_feature
|
|
|
|
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_pim sanity test"
|