Document the relationship between octal numbers and the leading zero

Fixes #37875
pull/37974/head
Toshio Kuratomi 7 years ago
parent a82fea65c1
commit 02f44176b9

@ -23,9 +23,12 @@ class ModuleDocFragment(object):
options:
mode:
description:
- 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)).
- "Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers.
You must either specify the leading zero so that Ansible's YAML parser knows it is an octal
number (like C(0644) or C(01777)) or quote it (like C('644') or C('0644') so Ansible
receives a string and can do its own conversion from string into number. Giving Ansible a number
without following one of these rules will end up with a decimal number which will 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:
description:
- Name of the user that should own the file/directory, as would be fed to I(chown).

Loading…
Cancel
Save