mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
c9fea2b74b
* To add new module cnos_lldp.
44 lines
926 B
YAML
44 lines
926 B
YAML
---
|
|
- 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 }}"
|