Skip to content

Conversation

@vitabaks
Copy link
Owner

Issue: #790

This PR resolves the issue where the Ansible task failed to configure the .pgpass file due to a “Permission denied” error when specifying a different path in the postgresql_home_dir variable.

Fixed:

TASK [pgpass: Configure a password file (/data/var/lib/postgresql/-pgpass)] *****************************************************
task path: /home/infraoperator/postgres_prod/postgresql_cluster/roles/pgpass/tasks/main.yml:3
fatal: [192.168.7.31]: FAILED! => {
"msg": "Failed to get information on remote file (/data/var/lib/postgresql/.pgpass): Permission denied"
}

The task now uses become_user: root and adjusts permissions to ensure proper access for the postgres user.

@vitabaks vitabaks self-assigned this Oct 14, 2024
@vitabaks vitabaks changed the title pgpass: run the task from the root user pgpass: run the task as the root user Oct 14, 2024
@vitabaks vitabaks merged commit 5f58d90 into master Oct 15, 2024
16 checks passed
@vitabaks vitabaks deleted the pgpass branch October 15, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants