public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nick <[email protected]>
To: Andreas 'ads' Scherbaum <[email protected]>
Cc: [email protected]
Subject: Re: Initial Postgres admin account setup using Ansible?
Date: Tue, 31 Dec 2024 17:22:08 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMDzVO_HnP+V6bL0myTt0=RRXYLNOfj4XszEKa+LvPSnePO9yg@mail.gmail.com>
References: <[email protected]>
<CAMDzVO_HnP+V6bL0myTt0=RRXYLNOfj4XszEKa+LvPSnePO9yg@mail.gmail.com>
On Tue, 2024-12-31 at 23:16 +0100, Andreas 'ads' Scherbaum wrote:
>
>
>
> Can you please provide an example of the task(s) which fail?
> If you have passwordless "sudo" configured tor the user running
> Ansible,
> this works:
>
> - name: Ping PostgreSQL
> postgresql_ping:
> db: postgres
> login_unix_socket: "/var/run/postgresql"
> login_user: postgres
> become: yes
> become_user: postgres
>
> More examples and details:
> https://andreas.scherbaum.la/writings/Managing_PostgreSQL_with_Ansible_-_Percona_Live_2022.pdf
>
>
When trying this:
- name: Ping PostgreSQL
postgresql_ping:
db: postgres
login_unix_socket: "/var/run/postgresql"
login_user: postgres
become: yes
become_user: postgres
I get:
Ping PostgreSQL...
xxx.xxx.xxx.xxx failed | msg: Failed to set permissions on the
temporary files Ansible needs to create when becoming an unprivileged
user (rc: 1, err: chmod: invalid mode: ‘A+user:postgres:rx:allow’
Try 'chmod --help' for more information.
}). For information on working around this, see
https://docs.ansible.com/ansible-core/2.17/playbook_guide/playbooks_privilege_escalation.html#risks-...
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Initial Postgres admin account setup using Ansible?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox