[-] sudo
[!] Fix _execute_yml
This commit is contained in:
@@ -321,17 +321,20 @@ class VMKer:
|
||||
y = y.get('before-reboot')
|
||||
logger.info(f"[{name}] [YML] Executing {f.name}..")
|
||||
if not y:
|
||||
return logger.debug(f"[{name}] [YML] Block 'before-reboot' not found. Skipping..")
|
||||
logger.debug(f"[{name}] [YML] Block 'before-reboot' not found. Skipping..")
|
||||
continue
|
||||
for n, c in y.items():
|
||||
logger.info(f"[{name}] [YML] {n}. Steps: {len(c)}.")
|
||||
for i, cmd in enumerate(c, 1):
|
||||
logger.debug(f"executing: {cmd}")
|
||||
logger.debug(ssh.send_command_timing(cmd, read_timeout=float(timeout)))
|
||||
_ssh_output = ssh.send_command_timing(cmd, read_timeout=float(timeout))
|
||||
logger.debug(_ssh_output)
|
||||
logger.info(f"[{name}] [YML] {n}: {i}/{len(c)}")
|
||||
else:
|
||||
y = y.get('after-reboot')
|
||||
if not y:
|
||||
return logger.debug(f"[{name}] [YML] Block 'after-reboot' not found. Skipping..")
|
||||
logger.debug(f"[{name}] [YML] Block 'after-reboot' not found. Skipping..")
|
||||
continue
|
||||
for n, c in y.items():
|
||||
logger.info(f"[{name}] [YML] {n}. Steps: {len(c)}.")
|
||||
for i, cmd in enumerate(c, 1):
|
||||
|
||||
Reference in New Issue
Block a user