Author: | Jason Edelman (@jedelman8) |
---|
parameter | required | default | choices | comments |
---|---|---|---|---|
file | no | None | YAML file that has the table specified in table parameter | |
host | yes | Set to {{ inventory_hostname }} | ||
logfile | no | None | Path on the local server where the progress status is logged for debugging purposes | |
mode | no | None | mode of console connection (telnet/serial). If mode is not provided SSH connection is used. | |
passwd | no | assumes ssh-key active | Login password | |
path | no | op directory in jnpr.junos.op | Path of location of the YAML file | |
port | no | 830 | port number to use when connecting to the device | |
response_type | no | list_of_dicts | Option to change how data is returned from the module. Either list of dictionaries or the Juniper PyEZ default (list of tuples, which becomes lists by the time it gets to Ansible) | |
ssh_private_key_file | no | None | This can be used if you need to provide a private key rather than loading the key into the ssh-key-ring/environment. if your ssh-key requires a password, then you must provide it via **passwd** | |
table | no | None | Name of PyEZ Table | |
user | no | $USER | Login username |
Note
Requires junos-eznc >= 1.2.2
# GET NEIGHBOR INFO USING STD LLDP TABLE
- junos_get_table: table=LLDPNeighborTable file=lldp.yml host={{ inventory_hostname }} user={{ un }} passwd={{ pwd }}
# GET NEIGHBOR INFO USING CUSTOM LLDP TABLE IN CUSTOM PATH
- junos_get_table: table=NTCNeighborTable path=tables/ file=ntclldp.yaml host={{ inventory_hostname }} user={{ un }} passwd={{ pwd }}
#
- name: Table/View example via console server connection using PyEZ >= 2.0
junos_get_table:
table=RouteTable
file=routes.yml
host={{ inventory_hostname }}
port=7016
mode='telnet'