1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/cnos_lldp/tests/cli/basic.yaml

45 lines
926 B
YAML
Raw Normal View History

---
- 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 }}"