From 79dd0466b5d988cca0124999f7daa49e7d8a9663 Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Tue, 19 May 2015 11:45:00 -0700 Subject: [PATCH] Adding directory creation example to file module. --- lib/ansible/modules/files/file.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index 96d5e6df38..8fac305045 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -101,6 +101,9 @@ EXAMPLES = ''' # touch the same file, but add/remove some permissions - file: path=/etc/foo.conf state=touch mode="u+rw,g-wx,o-rwx" +# create a directory if it doesn't exist +- file: path=/etc/some_directory state=directory mode=0755 + '''