2016-10-28 18:50:29 +00:00
|
|
|
---
|
2017-12-20 16:26:09 +00:00
|
|
|
- debug: msg="START cli/toplevel_after.yaml on connection={{ ansible_connection }}"
|
2016-10-28 18:50:29 +00:00
|
|
|
|
|
|
|
- name: setup
|
|
|
|
iosxr_config:
|
|
|
|
commands:
|
|
|
|
- "no cdp"
|
2017-01-09 17:21:04 +00:00
|
|
|
- "hostname {{ inventory_hostname_short }}"
|
2016-10-28 18:50:29 +00:00
|
|
|
match: none
|
|
|
|
|
|
|
|
- name: configure top level command with before
|
|
|
|
iosxr_config:
|
|
|
|
commands: ['hostname foo']
|
|
|
|
after: ['cdp']
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
2017-03-01 13:10:40 +00:00
|
|
|
- "'hostname foo' in result.commands"
|
|
|
|
- "'cdp' in result.commands"
|
2016-10-28 18:50:29 +00:00
|
|
|
|
|
|
|
- name: configure top level command with before idempotent check
|
|
|
|
iosxr_config:
|
|
|
|
commands: ['hostname foo']
|
|
|
|
after: ['no cdp']
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: teardown
|
|
|
|
iosxr_config:
|
|
|
|
commands:
|
|
|
|
- "no cdp"
|
2017-01-09 17:21:04 +00:00
|
|
|
- "hostname {{ inventory_hostname_short }}"
|
2016-10-28 18:50:29 +00:00
|
|
|
match: none
|
|
|
|
|
2017-12-20 16:26:09 +00:00
|
|
|
- debug: msg="END cli/toplevel_after.yaml on connection={{ ansible_connection }}"
|