Nutanix dynamic inventory script for Ansible

  • 11 February 2017
  • 7 replies

Badge +1

I've just released a Nutanix dynamic inventory script for Ansible, and I thought I'd share it here for anyone who might find it useful:

It's able to generate an inventory from multiple clusters, and you can list VMs by name or IP address.

Questions, comments, and contributions are more than welcome.

7 replies

Userlevel 7
Badge +35
Thanks for sharing keeler - great work.
Userlevel 2
Badge +13
thanks for sharing
Userlevel 2
Badge +13
@keeler has there been any further progress around what was discussed in the pull request ?

Badge +1
@seaton I haven't heard anything else from @Jon.
Userlevel 2
Badge +13
@keeler offer still stands if you want help with ansible module
Badge +1
@seaton I'm happy to take pull requests if you want to add functionality for the v2 API. It would be pretty easy to add a command line flag like --api that switches between API versions.

When I run "ansible hosts -i -m ping" I get the following Error..

[warning]: * Failed to parse /Path/to/file/ with script
plugin: failed to parse executable inventory script results from
/Path/to/file/ Syntax Error while loading YAML. found
unexpected ':' The error appears to have been in '': line 1, column 1873,
but may be elsewhere in the file depending on the exact syntax problem.

I removed the file location for obvious reasons.

Any help would be greatly appreciated.

Also.. When I run the script "--pretty" "--names" "--list" , the script comes back without issues.