@ -28,11 +28,12 @@ DOCUMENTATION = """
required : True
required : True
encrypt :
encrypt :
description :
description :
- Whether the user requests that this password is returned encrypted or in plain text .
- Which hash scheme to encrypt the returning password , should be one hash scheme from C ( passlib . hash ) .
- Note that the password is always stored as plain text .
- If not provided , the password will be returned in plain text .
- Note that the password is always stored as plain text , only the returning password is encrypted .
- Encrypt also forces saving the salt value for idempotence .
- Encrypt also forces saving the salt value for idempotence .
type : boolean
- Note that before 2.6 this option was incorrectly labeled as a boolean for a long time .
default : Tru e
default : Non e
chars :
chars :
version_added : " 1.4 "
version_added : " 1.4 "
description :
description :
@ -234,13 +235,13 @@ def _parse_content(content):
return password , salt
return password , salt
def _format_content ( password , salt , encrypt = Tru e) :
def _format_content ( password , salt , encrypt = Non e) :
""" Format the password and salt for saving
""" Format the password and salt for saving
: arg password : the plaintext password to save
: arg password : the plaintext password to save
: arg salt : the salt to use when encrypting a password
: arg salt : the salt to use when encrypting a password
: arg encrypt : Wh ether the user requests that this password is encrypted .
: arg encrypt : Wh ich method the user requests that this password is encrypted .
Note that the password is saved in clear . Encrypt just tells us if we
Note that the password is saved in clear . Encrypt just tells us if we
must save the salt value for idempotence . Defaults to Tru e.
must save the salt value for idempotence . Defaults to Non e.
: returns : a text string containing the formatted information
: returns : a text string containing the formatted information
. . warning : : Passwords are saved in clear . This is because the playbooks
. . warning : : Passwords are saved in clear . This is because the playbooks