mirror of
https://github.com/ansible/tower-cli.git
synced 2026-02-06 00:48:50 +01:00
18 lines
327 B
Python
Executable File
18 lines
327 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import json
|
|
|
|
inv = {
|
|
'_meta': {
|
|
'hostvars': {}
|
|
},
|
|
'hosts': []
|
|
}
|
|
|
|
for num in range(0, 3):
|
|
host = u"host-%0.2d" % num
|
|
inv['hosts'].append(host)
|
|
inv['_meta']['hostvars'][host] = dict(ansible_ssh_host='127.0.0.1', ansible_connection='local')
|
|
|
|
print(json.dumps(inv, indent=2))
|