On 5/19/20 12:44 PM, Ikhsan Faruqi wrote:
> Hi, I trying to add new hba_records using pg_hba_module
> <https://docs.ansible.com/ansible/latest/modules/postgresql_pg_hba_module.html>
>  but got this error:
> 
> |
> failed:[pg-12](item={'hba_database':'test-db','hba_users':'johndoe','hba_connection_type':'host','hba_source':'0.0.0.0/0','hba_method':'trust'})=>{"ansible_loop_var":"item","changed":false,"item":{"hba_connection_type":"host","hba_database":"test-db","hba_method":"trust","hba_source":"0.0.0.0/0","hba_users":"johndoe"},"msg":"value
> of method must be one of: trust, reject, md5, password, gss, sspi, krb5, 
> ident, peer, ldap, radius, cert, pam,
> scram-sha-256, got: trust "}
> 
> 
> |
> 
> this is what my vars.yml looks like:
> 
> |
> -hba_records:
>           -hba_database:test-db
>             hba_users:johndoe
>             hba_connection_type:host
>             hba_source:0.0.0.0/0
>             hba_method:trust
>           -hba_database:test-db
>             hba_users:alexsong
>             hba_connection_type:host
>             hba_source:0.0.0.0/0
>             hba_method:trust
> |
> 
> my ansible info:
> 

Hello Ikshan,

the module expects the parameters without the hba_ prefix as clearly stated in 
the documentation and shown in the examples.

Regards
        Racke

> |
> ➜  ~ ansible --version
> ansible 2.9.5
>   config file = None
>   configured module search path = ['/Users/MASKED/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = 
> /Users/MASKEd/Library/Python/3.7/lib/python/site-packages/ansible
>   executable location = /Users/MASKED/Library/Python/3.7/bin/ansible
>   python version = 3.7.5 (default, Nov  1 2019, 02:16:23) [Clang 11.0.0 
> (clang-1100.0.33.8)]
> |
> 
> 
> -- 
> 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 
> <mailto:ansible-project+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/cc058c2d-6c30-48ad-972c-a4e7343eeed2%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/cc058c2d-6c30-48ad-972c-a4e7343eeed2%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/1aa1c6f9-018f-3325-40f1-e6e9c384fbb5%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to