Script to generate dns for infracloud
This script makes management of 100+ dns names more realistic It only outputs commands to rackdns, it does not run them Change-Id: I48ecaca79eb1cd274f102da6eb3592a292b7a5fb
This commit is contained in:
parent
d0d11e1333
commit
16e56fce9d
13
tools/infracloud_dns_from_bifrost.py
Executable file
13
tools/infracloud_dns_from_bifrost.py
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
f = open('hiera/group/infracloud.yaml')
|
||||||
|
|
||||||
|
bf = yaml.load(f.read())
|
||||||
|
|
||||||
|
for node in bf['ironic_inventory_hpuswest']:
|
||||||
|
name = node
|
||||||
|
ip = bf['ironic_inventory_hpuswest'][node]['ipv4_public_address']
|
||||||
|
print "rackdns record-create --name {0} --type A".format(name),
|
||||||
|
print "--data {0} --ttl 3600 openstack.org".format(ip)
|
Loading…
Reference in New Issue
Block a user