mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
711 B
YAML
35 lines
711 B
YAML
8 years ago
|
---
|
||
|
- name: Setup
|
||
|
nxos_banner:
|
||
7 years ago
|
banner: motd
|
||
8 years ago
|
text: |
|
||
7 years ago
|
Junk motd banner
|
||
8 years ago
|
over multiple lines
|
||
|
state: present
|
||
7 years ago
|
provider: "{{ connection }}"
|
||
8 years ago
|
|
||
7 years ago
|
- name: remove motd
|
||
|
nxos_banner: &rm-motd
|
||
|
banner: motd
|
||
8 years ago
|
state: absent
|
||
7 years ago
|
provider: "{{ connection }}"
|
||
8 years ago
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == true"
|
||
7 years ago
|
- "'no banner motd' in result.commands"
|
||
8 years ago
|
|
||
7 years ago
|
- name: remove motd (idempotent)
|
||
|
nxos_banner: *rm-motd
|
||
8 years ago
|
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"
|