1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/nxos_banner/tests/common/basic-no-exec.yaml
Nathaniel Case 862cde5e82 [WIP] Fix nxos_banner (#28607)
* Fix `'state': 'absent'`

* Replace idempotence tests with references

* Fix issues with nxos_banner
2017-08-28 17:09:54 -04:00

34 lines
711 B
YAML

---
- name: Setup
nxos_banner:
banner: exec
text: |
Junk exec banner
over multiple lines
state: present
provider: "{{ connection }}"
- name: remove exec
nxos_banner: &rm-exec
banner: exec
state: absent
provider: "{{ connection }}"
register: result
- assert:
that:
- "result.changed == true"
- "'no banner exec' in result.commands"
- name: remove exec (idempotent)
nxos_banner: *rm-exec
register: result
- assert:
that:
- "result.changed == false"
- "result.commands | length == 0"
# FIXME add in tests for everything defined in docs
# FIXME Test state:absent + test:
# FIXME Without powers ensure "privileged mode required"