- name: Get neighbors
junos_rpc:
rpc: "get-lldp-interface-neighbors"
output: 'xml'
args:
interface_device: A
register: net_topology
I have tried to loop over the args like this:
- name: Get neighbors
junos_rpc:
rpc: "get-lldp-interface-neighbors"
output: 'xml'
args:
interface_device: "{{ item }}"
loop:
- A
- B
- C
register: net_topology
But this is not working, because in this way the "A" is not recognised and i am getting an error like this:
{"ansible_loop_var": "item", "changed": false, "item": "A", "msg": "Unsupported parameters for (junos_rpc) module: junos_rpc Supported parameters include: args, attrs, host, output, password, port, provider, rpc, ssh_keyfile, timeout, transport, username"}