cloudinit: Don't regenerate root password
Store the first one we generate for later usage Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
da996317f8
commit
04b15f0dba
|
@ -22,9 +22,11 @@ class CloudInitData():
|
|||
meta_data = None
|
||||
|
||||
def _generate_password(self):
|
||||
self.generated_root_password = ""
|
||||
for dummy in range(16):
|
||||
self.generated_root_password += random.choice(string.ascii_letters + string.digits)
|
||||
if not self.generated_root_password:
|
||||
self.generated_root_password = ""
|
||||
for dummy in range(16):
|
||||
self.generated_root_password += random.choice(
|
||||
string.ascii_letters + string.digits)
|
||||
return self.generated_root_password
|
||||
|
||||
def _get_password(self, pwdfile):
|
||||
|
|
Loading…
Reference in New Issue