From ef9dac548f084bc30a5a92eeb93369aec4701b08 Mon Sep 17 00:00:00 2001 From: Krzysztof Zawadzki Date: Wed, 14 Feb 2018 13:18:13 +0100 Subject: [PATCH] File Module docs, adding mode permission example with sticky bit (#36151) * File Module docs, adding mode permission example with sticky bit --- lib/ansible/modules/files/file.py | 5 +++++ lib/ansible/utils/module_docs_fragments/files.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index be280453fd2..4463d19826d 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -84,6 +84,11 @@ EXAMPLES = ''' owner: foo group: foo mode: 0644 +- file: + path: /work + owner: root + group: root + mode: 01777 - file: src: /file/to/link/to dest: /path/to/symlink diff --git a/lib/ansible/utils/module_docs_fragments/files.py b/lib/ansible/utils/module_docs_fragments/files.py index cd4c120fc54..9594520b919 100644 --- a/lib/ansible/utils/module_docs_fragments/files.py +++ b/lib/ansible/utils/module_docs_fragments/files.py @@ -25,7 +25,7 @@ options: required: false default: null description: - - Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers (like 0644). + - Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers (like C(0644) or C(01777)). Leaving off the leading zero will likely have unexpected results. As of version 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)). owner: