I am trying to run a command in Ansible so as to find the neighbors in my network:
- name: Get neighbors
junos_rpc:
rpc: "get-lldp-interface-neighbors"
output: 'xml'
args:
interface_device: A
register: net_topology
So my problem comes when in this task I need to loop over a list and give another arg for the interface_device and register the result also in another variable 'net_topology' every time.