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
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"}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/04e97bb5-3947-4fbe-9374-7774c21333c9%40googlegroups.com.