Re: Initial Postgres admin account setup using Ansible?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Nick <lists2(at)ageofdream(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Initial Postgres admin account setup using Ansible?
Date: 2024-12-31 22:10:11
Message-ID: DB47A2EB-C060-4AE7-842A-D10C6CF68FC4@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Dec 31, 2024, at 13:31, Nick <lists2(at)ageofdream(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas 'ads' Scherbaum 2024-12-31 22:16:46 Re: Initial Postgres admin account setup using Ansible?
Previous Message Nick 2024-12-31 21:31:44 Initial Postgres admin account setup using Ansible?