2018-01-22 07:00:52 +01:00
|
|
|
---
|
|
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_pim sanity test"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
|
2019-06-19 17:52:03 +02:00
|
|
|
- name: "Setup: Disable features"
|
2018-01-22 07:00:52 +01:00
|
|
|
nxos_feature: &disable_feature
|
2019-06-19 17:52:03 +02:00
|
|
|
feature: "{{ item }}"
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 07:00:52 +01:00
|
|
|
state: disabled
|
2019-06-19 17:52:03 +02:00
|
|
|
ignore_errors: yes
|
|
|
|
loop:
|
|
|
|
- pim
|
|
|
|
- bfd
|
2018-01-22 07:00:52 +01:00
|
|
|
|
2019-06-19 17:52:03 +02:00
|
|
|
- name: "Setup: Enable features"
|
2018-01-22 07:00:52 +01:00
|
|
|
nxos_feature:
|
2019-06-19 17:52:03 +02:00
|
|
|
feature: "{{ item }}"
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 07:00:52 +01:00
|
|
|
state: enabled
|
2019-06-19 17:52:03 +02:00
|
|
|
loop:
|
|
|
|
- pim
|
|
|
|
- bfd
|
2018-01-22 07:00:52 +01:00
|
|
|
|
|
|
|
- name: "Setup: Configure ssm_range none"
|
|
|
|
nxos_pim: &none
|
|
|
|
ssm_range: "none"
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 07:00:52 +01:00
|
|
|
|
|
|
|
- block:
|
2019-06-19 17:52:03 +02:00
|
|
|
- name: Initial config from none
|
2018-01-22 07:00:52 +01:00
|
|
|
nxos_pim: &configure
|
2019-06-19 17:52:03 +02:00
|
|
|
bfd: enable
|
|
|
|
ssm_range:
|
2018-01-22 07:00:52 +01:00
|
|
|
- "239.128.1.0/24"
|
|
|
|
- "224.0.0.0/8"
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 07:00:52 +01:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
2019-06-19 17:52:03 +02:00
|
|
|
- name: Initial config idempotence
|
2018-01-22 07:00:52 +01:00
|
|
|
nxos_pim: *configure
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: Configure ssm_range default
|
|
|
|
nxos_pim: &conf_default
|
2019-06-19 17:52:03 +02:00
|
|
|
bfd: disable
|
2018-01-22 07:00:52 +01:00
|
|
|
ssm_range: "default"
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2018-01-22 07:00:52 +01:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
2019-06-19 17:52:03 +02:00
|
|
|
- name: ssm_range default idempotence
|
2018-01-22 07:00:52 +01:00
|
|
|
nxos_pim: *conf_default
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
- name: Configure ssm_range none
|
|
|
|
nxos_pim: *none
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
2019-06-19 17:52:03 +02:00
|
|
|
- meta: end_play
|
|
|
|
- name: ssm_range none idempotence
|
2018-01-22 07:00:52 +01:00
|
|
|
nxos_pim: *none
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
always:
|
2019-06-19 17:52:03 +02:00
|
|
|
- name: "Teardown: Disable features"
|
|
|
|
nxos_feature:
|
|
|
|
feature: "{{ item }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
state: disabled
|
|
|
|
ignore_errors: yes
|
|
|
|
loop:
|
|
|
|
- pim
|
|
|
|
- bfd
|
2018-01-22 07:00:52 +01:00
|
|
|
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_pim sanity test"
|