You manual command has more arguments than the one in your task.
Try making that consistent.

If that doesn't work, try hardcoding the hash in your task to see if
that works at all.




On Tue, 10 Mar 2020 at 13:21, Bala Mutyam <koti.reddy...@gmail.com> 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/1d3e8db8-01b9-4363-a3aa-67e077f35b62%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwPEpK5TvvGHT_hMivvqZ-ERBeM8bXKfr_EM-AG%3Dn1ACZQ%40mail.gmail.com.

Reply via email to