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/junos_lldp/tests/netconf/basic.yaml

50 lines
1 KiB
YAML
Raw Normal View History

---
- debug: msg="START junos_lldp netconf/basic.yaml"
- name: setup - remove lldp
junos_lldp:
state: absent
provider: "{{ netconf }}"
- name: configure lldp
junos_lldp:
state: present
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- "'[edit]\n- protocols {\n- lldp {\n- disable;\n- }\n- }' in result.diff.prepared"
- name: configure lldp (idempotent)
junos_lldp:
state: present
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == false"
- name: Disable lldp
junos_lldp:
state: absent
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- "'[edit]\n+ protocols {\n+ lldp {\n+ disable;\n+ }\n+ }' in result.diff.prepared"
- name: Disable lldp (idempotent)
junos_lldp:
state: absent
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == false"