Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgpass: run the task as the root user #791

Merged
merged 1 commit into from
Oct 15, 2024
Merged

pgpass: run the task as the root user #791

merged 1 commit into from
Oct 15, 2024

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.

1 participant