diff --git a/ansible/apply b/ansible/apply index f2147dd65..cf53950e3 100755 --- a/ansible/apply +++ b/ansible/apply @@ -55,6 +55,10 @@ def run_playbook(args): ansible_args += ["-u", args.user] if args.start_at_task is not None: ansible_args += ["--start-at-task", args.start_at_task] + if args.check: + ansible_args += ["--check"] + if args.diff: + ansible_args += ["--diff"] res = subprocess.run(ansible_args, cwd=str(tempdir)) if res.returncode != 0: exit(1) @@ -72,6 +76,14 @@ if __name__ == "__main__": "--start-at-task", help="start at a task with the provided name", default=None, ) + parser.add_argument( + "--check", help="perform an Ansible check run", + action="store_true", + ) + parser.add_argument( + "--diff", help="perform an Ansible diff run", + action="store_true", + ) args = parser.parse_args() install_ansible()