mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add support for crypted passwords to password lookup
Added new parameter 'encrypt' with same semantics from that of vars_prompt. When encryption is requested a random salt will be generated and stored along the password in the form: '<password> salt=<salt>'. Also store passwords with an ending '\n' for easier looking at files with console tools. File content was being already rstripped so this is harmless.
This commit is contained in:
@@ -537,6 +537,15 @@ This length can be changed by passing an extra parameter::
|
||||
target=/tmp/{{ client }}_{{ tier }}_{{ role }}_backup.sql
|
||||
with_password: credentials/{{ client }}/{{ tier }}/{{ role }}/mysqlpassword length=15
|
||||
|
||||
(...)
|
||||
|
||||
# create an user with a given password
|
||||
- user: name=guestuser
|
||||
state=present
|
||||
uid=5000
|
||||
password={{ item }}
|
||||
with_password: credentials/{{ hostname }}/userpassword encrypt=sha256_crypt
|
||||
|
||||
Setting the Environment (and Working With Proxies)
|
||||
``````````````````````````````````````````````````
|
||||
|
||||
|
||||
Reference in New Issue
Block a user