ansible/test/integration/targets/ios_banner/tests/cli/basic-no-login.yaml
Nathaniel Case cb1b705218
ios integration tests to network_cli (#33920)
* Preliminary steps

* Fix Python3 network_cli ios

* Add connection to debug strings

* Fix ios confirm prompt by way of optional newline

Also update ios_user delete tests
2017-12-20 09:03:29 -05:00

44 lines
837 B
YAML

---
- name: Setup
ios_banner:
banner: login
text: |
Junk login banner
over multiple lines
state: present
authorize: yes
become: yes
- name: remove login
ios_banner:
banner: login
state: absent
authorize: yes
become: yes
register: result
- debug:
msg: "{{ result }}"
- assert:
that:
- "result.changed == true"
- "'no banner login' in result.commands" # does this break due to "contains?"
- name: remove login (idempotent)
ios_banner:
banner: login
state: absent
authorize: yes
become: yes
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"