51 lines
1,017 B
YAML
51 lines
1,017 B
YAML
|
---
|
||
|
- debug: msg="START net_lldp junos/basic.yaml"
|
||
|
|
||
|
|
||
|
- name: setup - remove lldp
|
||
|
net_lldp:
|
||
|
state: absent
|
||
|
provider: "{{ netconf }}"
|
||
|
|
||
|
- name: configure lldp
|
||
|
net_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)
|
||
|
net_lldp:
|
||
|
state: present
|
||
|
provider: "{{ netconf }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == false"
|
||
|
|
||
|
- name: Disable lldp
|
||
|
net_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)
|
||
|
net_lldp:
|
||
|
state: absent
|
||
|
provider: "{{ netconf }}"
|
||
|
register: result
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == false"
|