From 1129b943fca652528406c99592ec67db203d6324 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 29 Nov 2025 13:31:48 +0100 Subject: [PATCH] Added --diff option for deploy to check file differences --- cli/deploy.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cli/deploy.py b/cli/deploy.py index ec78df10..d6e9a795 100644 --- a/cli/deploy.py +++ b/cli/deploy.py @@ -18,7 +18,8 @@ def run_ansible_playbook( verbose=0, skip_build=False, skip_tests=False, - logs=False + logs=False, + diff=False, ): start_time = datetime.datetime.now() print(f"\n▶️ Script started at: {start_time.isoformat()}\n") @@ -81,6 +82,9 @@ def run_ansible_playbook( else: cmd.extend(["--ask-vault-pass"]) + if diff: + cmd.append("--diff") + if verbose: cmd.append("-" + "v" * verbose) @@ -281,6 +285,12 @@ def main(): action="store_true", help="Keep the CLI logs during cleanup command", ) + + parser.add_argument( + "--diff", + action="store_true", + help="Pass --diff to ansible-playbook to show configuration changes.", + ) # ---- Dynamically add mode flags from group_vars/all/01_modes.yml ---- script_dir = os.path.dirname(os.path.realpath(__file__)) @@ -309,6 +319,7 @@ def main(): skip_build=args.skip_build, skip_tests=args.skip_tests, logs=args.logs, + diff=args.diff, )