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"
|
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
|
|
|
|
|
|
|
|
- debug: msg="END cli/toplevel_after.yaml"
|