On 15.04.2018 11:18, Bishwajit Samanta wrote:
Hi, i am having a problem in setting up postgresql through ansible.


Peer authentication failed for user "postgres". I checked google, i found people as saying i need to use become and become_user: postgress. But even
after doing that i am getting, that those are not valid attribute .

- name: create a new postgresql Database
    name: "{{ my_db_name }}"
    # become: true
    # become_user: postgres

- name: Create Postgress User
    name: "{{ my_db_create_name }}"
    password: "{{ my_db_password }}"
    priv: "CONNECT/products:ALL"
    # become: true
    # become_user: postgres

- name: Ensuring no other user have Database Access
    db: "{{ my_db_create_name }}"
    role: PUBLIC
    type: database
    priv: ALL
    state: absent
    # become: true
    # become_user: postgres

Can anyone help me ?

become and become_user is directives for the task not the module, so they need to be align on the same level as postgres_xxxx and name.

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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to