diff options
Diffstat (limited to 'playbooks')
| -rwxr-xr-x | playbooks/openstack/sample-inventory/inventory.py | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/playbooks/openstack/sample-inventory/inventory.py b/playbooks/openstack/sample-inventory/inventory.py index 45cc4e15a..76e658eb7 100755 --- a/playbooks/openstack/sample-inventory/inventory.py +++ b/playbooks/openstack/sample-inventory/inventory.py @@ -89,13 +89,15 @@ def build_inventory():          # TODO(shadower): what about multiple networks?          if server.private_v4:              hostvars['private_v4'] = server.private_v4 +            hostvars['openshift_ip'] = server.private_v4 +              # NOTE(shadower): Yes, we set both hostname and IP to the private              # IP address for each node. OpenStack doesn't resolve nodes by              # name at all, so using a hostname here would require an internal              # DNS which would complicate the setup and potentially introduce              # performance issues. -            hostvars['openshift_ip'] = server.private_v4 -            hostvars['openshift_hostname'] = server.private_v4 +            hostvars['openshift_hostname'] = server.metadata.get( +                'openshift_hostname', server.private_v4)          hostvars['openshift_public_hostname'] = server.name          if server.metadata['host-type'] == 'cns': | 
