-
Couldn't load subscription status.
- Fork 167
Closed
Description
Trying to get the routing table using the following playbook:
- name: Get structured routing table
hosts: all
connection: local
gather_facts: False
roles:
- Juniper.junos
tasks:
- name: Get route table
junos_get_table:
table=RouteSummaryTable
file=routes.yml
host={{ inventory_hostname }}
port=22
register: result
- debug: var=result
I get the following error:
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 2198, in <module>
main()
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 235, in main
module.exit_json(resource=resource)
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 1776, in exit_json
kwargs = remove_values(kwargs, self.no_log_values)
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 655, in remove_values
return dict((k, remove_values(v, no_log_strings)) for k, v in value.items())
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 655, in <genexpr>
return dict((k, remove_values(v, no_log_strings)) for k, v in value.items())
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 653, in remove_values
return [remove_values(elem, no_log_strings) for elem in value]
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 655, in remove_values
return dict((k, remove_values(v, no_log_strings)) for k, v in value.items())
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 655, in <genexpr>
return dict((k, remove_values(v, no_log_strings)) for k, v in value.items())
File "/home/xionox/.ansible/tmp/ansible-tmp-1459256922.12-4199303295019/junos_get_table", line 666, in remove_values
raise TypeError('Value of unknown type: %s, %s' % (type(value), value))
TypeError: Value of unknown type: <class 'jnpr.junos.factory.Table._rspTable'>, _rspTable:switch1.lab: 4 items
fatal: [switch1.lab]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_name": "junos_get_table"}, "parsed": false}
If I run the same command as documented (LLDP table) it works fine.
Tried on both EX4200 and SRX100 with Ansible 2.0.1 and today's master of ansible-junos-stdlib.
Metadata
Metadata
Assignees
Labels
No labels