Closed ivazqueza closed 4 years ago
:tada: Thanks for opening your first issue here! Welcome to the community!
It turns out that this was not a bug in "panos_object_facts.py"
but the error was caused by a bad choice of the python interpreter.
Despite using connection:local
, ansible sets the python interpreter by a discovery on the remote machine. Then the python interpreter was set to python3 but in the ansible host the only pandevice and pan-python packages are the python2 versions, which resulted in the described error (not very descriptive, actually).
There are two possible solutions. The first one is to install the pandevice and pan-python versions for python3 in the ansible host.
The second is to configure the "localhost"
host in the inventory and set the variables for this host like this:
ansible_connection: local
ansible_python_interpreter: "/usr/bin/python"
When panos_object_facts.py is used with "delegate_to" it throws the error:
Expected behavior
It should get the facts about the referenced object.
Current behavior
The following error raises:
Possible solution
Don't know
Steps to reproduce
Run the following playbook:
Screenshots
None
Context
This error does not appear when using in the play:
However, it would be very interesting to be able to reference a remote host in order to have access to the facts and variables belonging to this host.
Your Environment