cb1b705218
* 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
44 lines
837 B
YAML
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"
|