-
Notifications
You must be signed in to change notification settings - Fork 477
Expand file tree
/
Copy pathdyninv.py
More file actions
executable file
·37 lines (34 loc) · 839 Bytes
/
Copy pathdyninv.py
File metadata and controls
executable file
·37 lines (34 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/python
import sys
inv = """\
{
"databases": {
"hosts": ["host1.example.com", "host2.example.com"],
"vars": {
"a": true
}
},
"webservers": [ "host2.example.com", "host3.example.com" ],
"atlanta": {
"hosts": [ "host1.example.com", "host4.example.com", "host5.example.com" ],
"vars": {
"b": false
},
"children": [ "marietta", "5points" ]
},
"marietta": [ "host6.example.com" ],
"5points": [ "host7.example.com" ],
"ungrouped": [ "moocow.example.com", "llama.example.com" ],
"_meta" : {
"hostvars": {
"moocow.example.com": {
"asdf" : 1234
},
"llama.example.com": {
"asdf" : 5678
}
}
}
}
"""
sys.stdout.write(inv)