Re: Initial Postgres admin account setup using Ansible? - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Initial Postgres admin account setup using Ansible?
Date
Msg-id DB47A2EB-C060-4AE7-842A-D10C6CF68FC4@thebuild.com
Whole thread Raw
In response to Initial Postgres admin account setup using Ansible?  (Nick <lists2@ageofdream.com>)
List pgsql-general
On Dec 31, 2024, at 13:31, Nick <lists2@ageofdream.com> wrote:
> What is the proper (secure) way to let the Ansible POSIX user manage
> postgres? It seems there should be a fully automated way to bootstrap
> an Ansible user for `postgres`.

This is generally done with "become" and "become_user" in a shell command, something like:

- name: Do something as the postgres user
  ansible.builtin.shell: "psql ..."
  register: pgbackrest_which_output
  become: true
  become_user: postgres




pgsql-general by date:

Previous
From: Nick
Date:
Subject: Initial Postgres admin account setup using Ansible?
Next
From: "Andreas 'ads' Scherbaum"
Date:
Subject: Re: Initial Postgres admin account setup using Ansible?