set root password only if set in manifest

This commit is contained in:
Olivier Sallou 2013-07-10 16:35:40 +02:00
parent a4e8f08260
commit a2e8d0838e

View file

@ -17,7 +17,8 @@ class SetRootPassword(Task):
def run(self, info): def run(self, info):
from common.tools import log_check_call from common.tools import log_check_call
log_check_call(['/usr/sbin/chpasswd'], 'root:'+info.manifest.credentials['root']) if info.manifest.credentials['root']:
log_check_call(['/usr/sbin/chpasswd'], 'root:'+info.manifest.credentials['root'])
class DisableSSHPasswordAuthentication(Task): class DisableSSHPasswordAuthentication(Task):
description = 'Disabling SSH password authentication' description = 'Disabling SSH password authentication'