ansible/test/integration/targets/cnos_lldp/tests/cli/basic.yaml
Anil Kumar Muraleedharan c9fea2b74b Lenovo cnos lldp (#52568)
* To add new module cnos_lldp.
2019-02-20 17:30:09 -05:00

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