FreeKB - check_mode (dry run)
Ansible - check_mode (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 module 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
  copy:
    src: /tmp/foo.txt
    dest: /tmp/foo.txt
    owner: foo
    group: foo
    mode: '0644'
  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 d1f53 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |