Merge "Script to generate dns for infracloud"

This commit is contained in:
Jenkins 2016-02-26 06:19:15 +00:00 committed by Gerrit Code Review
commit 4640be7648

View 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)