Created
September 6, 2017 15:37
-
-
Save dav1x/5c4b66998042c8a11f4cd35c4a582a8d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not cluster_id: | |
#create a unique cluster_id first | |
cluster_id = ''.join(random.choice('0123456789ABCDEF') for i in range(20)) | |
config.set('vmware', 'cluster_id', cluster_id) | |
for line in fileinput.input(vmware_ini_path, inplace=True): | |
if line.startswith('cluster_id'): | |
print "cluster_id=" + str(cluster_id) | |
else: | |
print line, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment