2016-10-28 18:50:29 +00:00
|
|
|
---
|
|
|
|
- debug: msg="START cli/toplevel_after.yaml"
|
|
|
|
|
|
|
|
- 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"
|
|
|
|
- "'hostname foo' in result.updates"
|
|
|
|
- "'cdp' in result.updates"
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
- debug: msg="END cli/toplevel_after.yaml"
|