- Posted In
- Red Hat Ansible Tower
I'm having trouble trying to get the hosts through a python script.
With the same script I am able to obtain data from two other hosts.
NOTE: The provider are nutanix clusters.
the script link is at: https://github.com/zanoniluiz/ansible-nutanix-inventory
The nutanix cluster in question is in the same version as the other two clusters.
When I run the script I get the following result:
[root @ srv-ansible-app-prd test-nutanix] # ansible-inventory -i nutanix.py --list
[WARNING]: * Failed to parse /root/test-nutanix/nutanix.py with script plugin: failed to parse executable inventory script results from / root / test-
nutanix / nutanix.py: Syntax Error while loading YAML. found unexpected ':' The error appears to be in '': line 1, column 36617, but may be elsewhere in the
file depending on the exact syntax problem.
[WARNING]: * Failed to parse /root/test-nutanix/nutanix.py with ini plugin: /root/test-nutanix/nutanix.py:3: Expected key = value host variable assignment, got: os
[WARNING]: Unable to parse /root/test-nutanix/nutanix.py as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
attached I am putting the result of the script with the two hosts that I have not reported the error