Ansible: How to chmod +x a file with Ansible?

Question:

What is the best way to chmod + x a file with ansible.

Converting the following script to ansible format.

This is what I have so far..

Answer:

ansible has mode parameter in file module exactly for this purpose.

To add execute permission for everyone (i.e. chmod a+x on command line):

Symbolic modes are supported since version 1.8, on a prior version you need to use the octal bits.

Leave a Reply