Possible bug: Using file to create directories recursively does not ensure owner/group

4 views
Skip to first unread message

Johannes Kastl

unread,
May 1, 2016, 5:08:21 AM5/1/16
to ansible...@googlegroups.com
Hi all,

using this snipped creates the directories foo, bar and xyz with the
correct owner.

- name: Create directories
file: dest=/foo/bar/xyz owner=0 group=0 mode=0755 state=directory
recurse=yes

If a directory does exist prior to running the playbook, this
directory is not touched and owner/group different from those state in
the play are not changed.


Is this intentional? Am I missing a parameter apart from recurse=yes?

Thanks in advance,

Johannes

P.S.: I am running ansible 2.0.1.0 on OSX 10.10, target host was a
linux machine.

signature.asc
Reply all
Reply to author
Forward
0 new messages