ansible/test/integration/targets/net_banner/tests/eos/basic-no-login.yaml

49 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: Setup
eos_banner:
banner: login
text: |
Junk login banner
over multiple lines
state: present
authorize: yes
provider: "{{ cli }}"
- name: remove login
net_banner:
banner: login
state: absent
authorize: yes
provider: "{{ cli }}"
register: result
- debug:
msg: "{{ result }}"
- assert:
that:
- "result.changed == true"
- "'no banner login' in result.commands" # does this break due to "contains?"
# Ensure sessions contains epoc. Will fail after 18th May 2033
- "'ansible_1' in result.session_name"
- name: remove login (idempotent)
net_banner:
banner: login
state: absent
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- "result.commands | length == 0"
# Ensure sessions contains epoc. Will fail after 18th May 2033
- "result.session_name is not defined"
# FIXME add in tests for everything defined in docs
# FIXME Test state:absent + test:
# FIXME Without powers ensure "privileged mode required"