If you want to control the file permissions when placing a file, also be aware you have access to the "mode" parameter.
The source permissions on the local filesystem are not used. If you are instead saying when replacing the file on the destination that the permissions change, let us know. On Fri, Aug 29, 2014 at 6:03 AM, Simon Zhang <[email protected]> wrote: > Hello, > > Recently, I have a problem about Ansible. In the current folder "test" > contains a file "aaa.sh" with file mode "-rwxrwxr-x". I copy the directory > using the example playbook. > > --- > - name: Copy file > hosts: 192.168.8.22 > remote_user: root > tasks: > - name: copy test > copy: src=./test dest=/work/ > > Then , I check this file in the hosts "192.168.8.22". The file mode is > "-rw-r--r--". > Why the file mode was changed? > How to do rightly? > > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/9376eb7a-67da-4233-9488-3f05fd598eb6%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/9376eb7a-67da-4233-9488-3f05fd598eb6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzU%3DWM%3D4fgdsNvncmw2djOG9UnZNWXn%2B15xk0O%3Ds%2BB7NQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
