FreeKB - Ansible check_mode parameter (dry run)
Ansible - check_mode parameter (dry run)

Command line option --check can be used to perform a task or run a playbook in dry run mode, meaning that no changes will be made on the manage nodes (e.g. target systems). For example, here is how to use the --check option with the ansible-playbook command.

ansible-playbook foo.yml --check


Or, the check_mode option can be used to determine if a task would have been successful. In this example, check mode is used to determine if foo.txt can be copied.

- name: "copy foo.txt"
    src: "/tmp/foo.txt"
    dest: "/tmp/foo.txt"
  check_mode: "yes"


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 6834f in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |