Skip to content

Commit 63166a5

Browse files
committed
fix(contrib/gce): replace discovery url properly
1 parent d830adf commit 63166a5

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

contrib/azure/create-azure-user-data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def main():
5757
coreos_template = get_file("../coreos/user-data.example")
5858

5959
coreos_template_w_url = None
60-
with open(coreos_template.name, 'r') as file :
60+
with open(coreos_template.name, 'r') as file:
6161
coreos_template_w_url = file.read()
6262

6363
coreos_template_w_url = coreos_template_w_url.replace('#DISCOVERY_URL', url)

contrib/gce/create-gce-user-data

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ def main():
5656
gce_template = get_file("gce-user-data-template")
5757
coreos_template = get_file("../coreos/user-data.example")
5858

59-
configuration_coreos_template = yaml.safe_load(coreos_template)
59+
coreos_template_w_url = None
60+
with open(coreos_template.name, 'r') as file:
61+
coreos_template_w_url = file.read()
62+
63+
coreos_template_w_url = coreos_template_w_url.replace('#DISCOVERY_URL', url)
64+
65+
configuration_coreos_template = yaml.safe_load(coreos_template_w_url)
6066
configuration_gce_template = yaml.safe_load(gce_template)
6167

6268
configuration = combine_dicts(configuration_coreos_template,

0 commit comments

Comments
 (0)