Skip to content
Snippets Groups Projects
Commit 93c0ce2f authored by Varac's avatar Varac
Browse files

Merge branch '346-creating-cluster-fails-if-the-hostname-is-oas-dev' into 'master'

Resolve "Creating cluster fails if the hostname is `oas-dev`"

Closes #346

See merge request openappstack/openappstack!106
parents a8441a16 10741c07
No related branches found
No related tags found
No related merge requests found
......@@ -67,9 +67,11 @@ def create_inventory(cluster):
'r') as stream:
inventory = yaml.safe_load(stream)
inventory['all']['hosts'][cluster.hostname] = \
inventory['all']['hosts']['oas-dev']
del inventory['all']['hosts']['oas-dev']
# Rename the hostname in the inventory to one provided by the user.
if cluster.hostname != 'oas-dev':
inventory['all']['hosts'][cluster.hostname] = \
inventory['all']['hosts']['oas-dev']
del inventory['all']['hosts']['oas-dev']
inventory['all']['hosts'][cluster.hostname]['ansible_host'] = \
cluster.ip_address
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment