Skip to content

Commit 6f78b23

Browse files
committed
ref(contrib/linode): use cloud-config's disco-url
1 parent d660222 commit 6f78b23

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

contrib/linode/apply-firewall.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ def get_discovery_url_from_user_data():
4646
try:
4747
current_dir = os.path.dirname(__file__)
4848
user_data_file = file(os.path.abspath(os.path.join(current_dir, name)), 'r')
49-
user_data = yaml.safe_load(user_data_file)
50-
return user_data['coreos']['etcd2']['discovery']
49+
return re.search('--discovery (http\S+)', user_data_file.read()).group(1)
5150
except:
5251
raise IOError('Could not load discovery url from ' + name)
5352

0 commit comments

Comments
 (0)