On 14.03.2019 06:55, Joshua J. Kugler wrote:
Yes, I'm including full passwords.
1) this is vm on local machine; will change before prod
I startet a LXC with Postgresql 10.6 and uses Ansible 2.7.8 with
psycopg2 2.7.4
2) You can use them in your debugging so you can use the same username/
password pairs that I do.
- name: Create redmine user
postgresql_user:
name: redmine
password: "hague9Tendon=table7Narrow6house6"
expires: infinity
become: true
become_user: postgres
postgres=# select rolname,rolpassword from pg_authid;
rolname | rolpassword
----------+-------------------------------------
postgres |
redmine | md5bbc5416c08a022eda40297f11f548594
(2 rows)
I run the same task an get this
postgres=# select rolname,rolpassword from pg_authid where
rolname='redmine';
rolname | rolpassword
---------+-------------------------------------
redmine | md5b561aa0ddb49924998e8225b57584608
(1 row)
That is the same as the manual
$ echo "md5$(echo -n 'hague9Tendon=table7Narrow6house6redmine' | md5sum
| awk '{print $1}')"
md5b561aa0ddb49924998e8225b57584608
postgres=# drop database redmine;
DROP DATABASE
postgres=# drop role redmine;
DROP ROLE
re-run playbook with:
- name: Create redmine user
postgresql_user:
name: redmine
password: "AAAZZZ"
expires: infinity
become: true
become_user: postgres
postgres=# select rolname,rolpassword from pg_authid;
rolname | rolpassword
----------+-------------------------------------
postgres |
redmine | md5bbc5416c08a022eda40297f11f548594
(2 rows)
I did not run drop, just rerun the task with new password
postgres=# select rolname,rolpassword from pg_authid where
rolname='redmine';
rolname | rolpassword
---------+-------------------------------------
redmine | md5c2ea21566b3c280dd6272290c478c037
(1 row)
Manual is the same:
$ echo "md5$(echo -n 'AAAZZZredmine' | md5sum | awk '{print $1}')"
md5c2ea21566b3c280dd6272290c478c037
Yah...some something is really odd here. Changing the password didn't
result
in any change, but changing the user name did. For now, I guess I'll do
a
shell command, and pipe to psql.
I can not confirm this behavior with Ansible 2.7.8 so if you are not
running latest maybe try to upgrade.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/556a89cca3d76cac422a1242960be24b%40olstad.com.
For more options, visit https://groups.google.com/d/optout.