Skip to content

Commit

Permalink
correctly specify hostname and fqdn in the user-data yaml and code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffrey forman committed Sep 29, 2018
1 parent 4053a02 commit f8d4366
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions configs/user-data.yaml
Expand Up @@ -15,3 +15,7 @@ ssh_authorized_keys:
{%- endfor %}

ssh_pwauth: True

hostname: {{ hostname }}
fqdn: {{ fqdn }}
manage_etc_hosts: True
3 changes: 2 additions & 1 deletion ubuntu_cloud.py
Expand Up @@ -28,7 +28,6 @@ def normalizeVMState(self):
super(UbuntuCloud, self).normalizeVMState()
self.downloadUbuntuCloudImage()
self.createVmDirectory()
# TODO: write network config data out.
self.writeUserData()
self.writeMetaData()
self.writeNetworkConfigData()
Expand Down Expand Up @@ -175,6 +174,8 @@ def render(template_file, context):
).get_template(filename).render(context)

user_data_vars = {
'hostname': self.getVmHostName(),
'fqdn': self.getVmName(),
'ssh_keys': self.getSshKey()
}

Expand Down

0 comments on commit f8d4366

Please sign in to comment.