Skip to content
Snippets Groups Projects

iptrunk_checks: added LLDP checks

Merged Aleksandr Kurbatov requested to merge feature/nat-616-lldp into develop
4 files
+ 39
0
Compare changes
  • Side-by-side
  • Inline
Files
4
- name: Juniper LLDP check
when: local_side.iptrunk_side_node.vendor == "juniper"
block:
- name: Get LLDP neighbors
junipernetworks.junos.junos_command:
commands:
- show lldp neighbors
register: response
- name: Show LLDP neighbors
ansible.builtin.debug:
msg: "{{ response.stdout_lines[0] }}"
- name: Nokia BFD check
when: local_side.iptrunk_side_node.vendor == "nokia"
block:
- name: Get LLDP neighbors
ansible.netcommon.netconf_rpc:
rpc: action
xmlns: "urn:ietf:params:xml:ns:yang:1"
content: |
<global-operations xmlns="urn:nokia.com:sros:ns:yang:sr:oper-global">
<md-cli-raw-command>
<md-cli-input-line>show system lldp neighbor</md-cli-input-line>
</md-cli-raw-command>
</global-operations>
display: json
register: out
- name: Show LLDP neighbors
ansible.builtin.debug:
msg: "{{out.output['rpc-reply']['nokiaoper:results']['nokiaoper:md-cli-output-block'].split('\n')}}"
Loading