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.
45 lines
926 B
YAML
45 lines
926 B
YAML
6 years ago
|
---
|
||
|
- debug: msg="START cnos_lldp cli/basic.yaml on connection={{ ansible_connection }}"
|
||
|
|
||
|
- name: Enable LLDP service
|
||
|
cnos_lldp:
|
||
|
state: present
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
- '"lldp receive" in result.commands'
|
||
|
- '"lldp transmit" in result.commands'
|
||
|
|
||
|
- name: Enable LLDP service again (idempotent)
|
||
|
cnos_lldp:
|
||
|
state: present
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
|
||
|
- name: Disable LLDP service
|
||
|
cnos_lldp:
|
||
|
state: absent
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
- '"no lldp receive" in result.commands'
|
||
|
- '"no lldp transmit" in result.commands'
|
||
|
|
||
|
- name: Disable LLDP service (idempotent)
|
||
|
cnos_lldp:
|
||
|
state: absent
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- 'result.changed == true'
|
||
|
|
||
|
- debug: msg="END cnos_lldp cli/basic.yaml on connection={{ ansible_connection }}"
|