Hi All,

I have been trying to avoid shell and command module to change permissions 
, I am using file module here . 

what I am trying : change permission of all directories inside a directory 
to 755 and all files to 644 . 
problem is I am not supposed to use shell and command module , so while 
trying to use file module I face issue . 

yaml file is below :

tasks:
    - file:
        path: /tmp/apps/abc
        state: directory
        mode: 0755
        recurse: yes 
    - file:
        path: /tmp/apps/abc
        state: file
        mode: 0644


so when running this I get error message saying /tmp/apps/abc is a 
directory .

but when I put below:
tasks:
    - file:
        path: /tmp/apps/abc
        state: directory
        mode: 0755
        recurse: yes 
    - file:
        path: /tmp/apps/abc
        state: file
        mode: 0644
        recurse: yes

it gives an error saying recurse can be used only with directory . 

now I am not sure how to proceed . 

-- 
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/186c34c3-50c9-4689-808a-11df1c92e51f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to