From 99aafcc8caf14f70300d8ed8d30ed86102e28c82 Mon Sep 17 00:00:00 2001 From: Alexhha Date: Mon, 10 Sep 2018 23:00:18 +0300 Subject: [PATCH] Update postgresql_user.py (#45146) * Update postgresql_user.py md5sum generates output with hypen. Something like the following ``` $ echo "md5$(echo -n 'verysecretpasswordJOE' | md5sum)" md5d011966da94d776cf59bf6dbde240e5d - ``` We need to remove hyphen from the output. Also the command by itself is incorrect ``` echo "md5$(echo -n 'verysecretpasswordJOE' | md5sum") ``` double quotes must be after right parenthesis ``` echo "md5$(echo -n 'verysecretpasswordJOE' | md5sum)" ``` +label: docsite_pr * Update postgresql_user.py Add curly braces --- lib/ansible/modules/database/postgresql/postgresql_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index 4074f261734..3cf74d6ed95 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -48,7 +48,7 @@ options: - When passing a hashed password it must be generated with the format C('str["md5"] + md5[ password + username ]'), resulting in a total of 35 characters. An easy way to do this is C(echo "md5$(echo -n - 'verysecretpasswordJOE' | md5sum)"). + 'verysecretpasswordJOE' | md5sum | awk '{print $1}')"). - Note that if the provided password string is already in MD5-hashed format, then it is used as-is, regardless of C(encrypted) parameter. db: