Hi,

Thanks for the reply.  By hard coding the hash working fine. 

I'm trying to workout this but this is giving me an error.


- name: Reset Admin pw
  become: yes
  become_user: postgres
  command: psql -c "update users set crypted_password = '{{ admin_password | 
password_hash('bcrypt', salt=None) }}' where login = 'admin'" sonarqube
  tags: query


On Tuesday, March 10, 2020 at 12:20:59 PM UTC, Bala Mutyam wrote:
>
> Hi Everyone,
>
> I'm trying to create a task for below command but it's not working, can 
> you help me how to make it work please?
>
> Command:
>
> update users set crypted_password = 
> '$2a$12$uCkkXmhW5ThVK8mpBvnXOOJRLd64LJeHTeCkSuB3lfaR2N0AYBaSi', salt=null, 
> hash_method='BCRYPT' where login = 'admin'
>
> - name: Reset Admin pw
>   become: yes
>   become_user: postgres
>   command: psql -c "update users set crypted_password = '{{ admin_password | 
> password_hash('bcrypt') }}' where login = 'admin'" sonarqube
>   tags: query
>
>
> I'm successfully running the task but not able to login with the 
> admin_password.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/93ac6259-fa81-4109-9719-b89531edd7dc%40googlegroups.com.

Reply via email to