1👍
The Ansible file module needs the full octal number supplied to the mode
parameter, rather than the shorthand 3 digit version we are used to using with the chmod
command.
As mentioned on http://docs.ansible.com/ansible/file_module.html, “Leaving off the leading zero will likely have unexpected results.”.
Try:
file: dest={{ item }} mode=0755 owner={{ app_user }} group={{ app_group }} state=directory
Hope that helps.
Source:stackexchange.com