[ansible-project] Re: Dynamic Inventory Error

2016-01-05 Thread pixel fairy
If your just trying to get the syntax of the json right, there are easier ways to test. heres the above as an inventory script. #!/usr/bin/env python import json inv = { "company": { "hosts": [ "server", "sensor" ] }, "_meta": {

[ansible-project] Re: Dynamic Inventory Error

2015-12-29 Thread Leon Pinkney
Just to add, if I change the line to: "ansible_ssh_port" : 22 I get: ValueError: invalid literal for int() with base 10: '22}' I edited "/usr/local/lib/python2.7/dist-packages/ansible/inventory/host.py" and before line 32 added: print '>>' + port + '<<' Which outputs: >> 22}<<