2016-10-28 20:50:29 +02:00
|
|
|
---
|
2018-05-18 00:47:15 +02:00
|
|
|
- debug: msg="START common/nonidempotent.yaml on connection={{ ansible_connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
|
|
|
|
- name: setup
|
|
|
|
nxos_config:
|
2017-09-08 13:56:09 +02:00
|
|
|
lines: hostname switch
|
2016-10-28 20:50:29 +02:00
|
|
|
match: none
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
|
|
|
|
- name: configure top level command
|
|
|
|
nxos_config:
|
|
|
|
lines: hostname foo
|
|
|
|
match: strict
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "'hostname foo' in result.updates"
|
|
|
|
|
|
|
|
- name: configure top level command idempotent check
|
|
|
|
nxos_config:
|
|
|
|
lines: hostname foo
|
|
|
|
match: strict
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: teardown
|
|
|
|
nxos_config:
|
2017-09-08 13:56:09 +02:00
|
|
|
lines: hostname switch
|
2016-10-28 20:50:29 +02:00
|
|
|
match: none
|
2018-07-02 15:43:51 +02:00
|
|
|
provider: "{{ connection }}"
|
2016-10-28 20:50:29 +02:00
|
|
|
|
2018-05-18 00:47:15 +02:00
|
|
|
- debug: msg="END common/nonidempotent.yaml on connection={{ ansible_connection }}"
|