fixed key error on optional() for creation steps
This commit is contained in:
parent
4ec9c86b2c
commit
6d3d9b3fbc
@ -60,6 +60,9 @@ def are_all_conditions_met(lxc: LXC):
|
||||
for condition_type in step["conditions"]:
|
||||
result = check_conditions(c_type=condition_type, parent=step["conditions"], lxc=lxc, result=result)
|
||||
|
||||
if len(result) == 0:
|
||||
return False
|
||||
|
||||
return all(result)
|
||||
|
||||
|
||||
@ -152,7 +155,7 @@ def run_steps(lxc: LXC):
|
||||
case "script":
|
||||
lxc_utils.run_script_step_parser(lxc, step)
|
||||
case "file_create":
|
||||
lxc.create_file(step["path"], optional(step["permission"], 644))
|
||||
lxc.create_file(step["path"], step.get("permission", 644))
|
||||
case "file_copy":
|
||||
lxc.pve.copy_file_to_lxc(lxc, get_path(lxc, step["path"]), step["destination"])
|
||||
case "folder":
|
||||
|
Loading…
Reference in New Issue
Block a user