|
|
@ -3,14 +3,24 @@
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
when: ansible_connection == "local"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- set_fact: gt_run="false"
|
|
|
|
|
|
|
|
- set_fact: gt_run="true"
|
|
|
|
|
|
|
|
when: not (platform is match("N5K")) and not (platform is match("N35"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- set_fact: group_timeout="never"
|
|
|
|
|
|
|
|
when: not (platform is match("N5K")) and not (platform is match("N35"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- set_fact: def_group_timeout="default"
|
|
|
|
|
|
|
|
when: not (platform is match("N5K")) and not (platform is match("N35"))
|
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- block:
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure igmp snooping with non-default values
|
|
|
|
- name: Configure igmp snooping with non-default values
|
|
|
|
nxos_igmp_snooping: &non-default
|
|
|
|
nxos_igmp_snooping: &non-default
|
|
|
|
snooping: true
|
|
|
|
snooping: false
|
|
|
|
group_timeout: never
|
|
|
|
group_timeout: "{{group_timeout|default(omit)}}"
|
|
|
|
link_local_grp_supp: true
|
|
|
|
link_local_grp_supp: false
|
|
|
|
report_supp: true
|
|
|
|
report_supp: false
|
|
|
|
v3_report_supp: true
|
|
|
|
v3_report_supp: true
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
provider: "{{ connection }}"
|
|
|
@ -19,14 +29,33 @@
|
|
|
|
- assert: &true
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: "Check Idempotence - Configure igmp snooping with non-default values"
|
|
|
|
|
|
|
|
nxos_igmp_snooping: *non-default
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Check Idempotence - Configure igmp snooping with non-default values"
|
|
|
|
- assert: &false
|
|
|
|
nxos_igmp_snooping: *non-default
|
|
|
|
that:
|
|
|
|
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
when: (imagetag and (imagetag is version_compare('D1', 'ne')))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure igmp snooping with default group timeout
|
|
|
|
|
|
|
|
nxos_igmp_snooping: &defgt
|
|
|
|
|
|
|
|
group_timeout: "{{def_group_timeout|default(omit)}}"
|
|
|
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
provider: "{{ connection }}"
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
- assert: *true
|
|
|
|
that:
|
|
|
|
when: gt_run
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: "Check Idempotence"
|
|
|
|
|
|
|
|
nxos_igmp_snooping: *defgt
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
when: gt_run or (imagetag and (imagetag is version_compare('D1', 'ne')))
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure igmp snooping with default values
|
|
|
|
- name: Configure igmp snooping with default values
|
|
|
|
nxos_igmp_snooping: &default
|
|
|
|
nxos_igmp_snooping: &default
|
|
|
@ -36,11 +65,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Check Idempotence - Configure igmp snooping with default values"
|
|
|
|
- block:
|
|
|
|
nxos_igmp_snooping: *default
|
|
|
|
- name: "Check Idempotence - Configure igmp snooping with default values"
|
|
|
|
register: result
|
|
|
|
nxos_igmp_snooping: *default
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
when: (imagetag and (imagetag is version_compare('D1', 'ne')))
|
|
|
|
|
|
|
|
|
|
|
|
always:
|
|
|
|
always:
|
|
|
|
- name: Configure igmp snooping with default values
|
|
|
|
- name: Configure igmp snooping with default values
|
|
|
|