diff --git a/src/lxc/creation_utils.py b/src/lxc/creation_utils.py index 3142fe5..73f2f41 100644 --- a/src/lxc/creation_utils.py +++ b/src/lxc/creation_utils.py @@ -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":