summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2016-09-27 23:31:21 +0200
committerMatt Clay <matt@mystile.com>2017-02-15 12:15:09 -0800
commit6fae1d2bbfa1086e4fc18e95acac96f98d838480 (patch)
tree5321153ef892f4e7b5114d4b9925128361b7eb51 /docs
parent103ede26dfe012cc2aef268ff97b73fd9b906c23 (diff)
downloadansible-6fae1d2bbfa1086e4fc18e95acac96f98d838480.tar.gz
Make password lookup treat /dev/null as a special case
I have from time to time a need of random password without wanting to write them down (one example is mailman list creation, that requires a password to be given to be sent to the list owner). But using /dev/null do not return null, but the empty string, which doesn't generate a password at all and so do not achieve my use case.
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/rst/playbooks_lookups.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/docsite/rst/playbooks_lookups.rst b/docs/docsite/rst/playbooks_lookups.rst
index fa6c45db10..d9b8c33994 100644
--- a/docs/docsite/rst/playbooks_lookups.rst
+++ b/docs/docsite/rst/playbooks_lookups.rst
@@ -52,6 +52,9 @@ a file at a given filepath.
If the file exists previously, it will retrieve its contents, behaving just like with_file. Usage of variables like "{{ inventory_hostname }}" in the filepath can be used to set
up random passwords per host (which simplifies password management in 'host_vars' variables).
+A special case is using ``/dev/null`` as a path. The password lookup will generate a new random password each time, but will not write it to ``/dev/null``. This can be used when you need a password
+without storing it on the controller.
+
Generated passwords contain a random mix of upper and lowercase ASCII letters, the
numbers 0-9 and punctuation (". , : - _"). The default length of a generated password is 20 characters.
This length can be changed by passing an extra parameter::