diff --git a/states/kopia/templates/kopia_backup.py.j2 b/states/kopia/templates/kopia_backup.py.j2 index fd04290..2587678 100644 --- a/states/kopia/templates/kopia_backup.py.j2 +++ b/states/kopia/templates/kopia_backup.py.j2 @@ -94,14 +94,14 @@ if __name__ == "__main__": if not res_init: print("init error") sys.exit(1) - if not set_policy(): - print("set policy error") - sys.exit(1) - if not set_cache(): - print("set cache error") - sys.exit(1) if args.action == "run": + if not set_policy(): + print("set policy error") + sys.exit(1) + if not set_cache(): + print("set cache error") + sys.exit(1) if not run(before_tasks={{ params.before_tasks|default([]) }}): print("run error") sys.exit(1)