[postgresql] become_user issue #7

Open
opened 2019-03-21 15:26:05 +01:00 by benpro · 1 comment
Contributor

Issue imported from forge.evolix.org on 2019-03-21 14:26:05

  • Project: ansible-roles
  • Issue: 2486
  • Tracker: Anomalie
  • Status: Nouveau
  • Author: Benoît S.
  • Category:
  • Started at: 2018-09-13 00:00:00
  • Done ratio: 0
  • Created at: 2018-09-13 15:17:17
  • Updated at: 2018-10-24 08:37:31
TASK [postgresql : Create nrpe user] *******************************************                                                                                                                                                                                                  
task path: ~/GIT/ansible-roles/postgresql/tasks/nrpe.yml:23                                                                                                                                                                                                            
fatal: [fondasol-alfresco2]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of '/tmp/ansible-tmp-1536850202.83-69857442191823/': Operation
 not permitted\nchown: changing ownership of '/tmp/ansible-tmp-1536850202.83-69857442191823/postgresql_user.py': Operation not permitted\n). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}             

The postgresql_user.py module is uploaded with root rights, then become_user want to execute it but fail due to permissions.
become_user: postgres is essential to have the postgresql peer authentification.
We need to find workaround.

> **Issue imported from forge.evolix.org on 2019-03-21 14:26:05** > * Project: ansible-roles > * Issue: 2486 > * Tracker: Anomalie > * Status: Nouveau > * Author: Benoît S. > * Category: > * Started at: 2018-09-13 00:00:00 > * Done ratio: 0 > * Created at: 2018-09-13 15:17:17 > * Updated at: 2018-10-24 08:37:31 ``` TASK [postgresql : Create nrpe user] ******************************************* task path: ~/GIT/ansible-roles/postgresql/tasks/nrpe.yml:23 fatal: [fondasol-alfresco2]: FAILED! => {"failed": true, "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of '/tmp/ansible-tmp-1536850202.83-69857442191823/': Operation not permitted\nchown: changing ownership of '/tmp/ansible-tmp-1536850202.83-69857442191823/postgresql_user.py': Operation not permitted\n). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"} ``` The postgresql\_user.py module is uploaded with root rights, then become\_user want to execute it but fail due to permissions. `become_user: postgres` is essential to have the postgresql peer authentification. We need to find workaround.
Author
Contributor

Comment imported from forge.evolix.org on 2019-03-21 14:26:05

  • Author: Benoît S.
  • Created at: 2018-10-24 08:37:31

Temporary solution is to have in ansible.cfg:

allow_world_readable_tmpfiles = True
> **Comment imported from forge.evolix.org on 2019-03-21 14:26:05** > * Author: Benoît S. > * Created at: 2018-10-24 08:37:31 Temporary solution is to have in `ansible.cfg`: allow_world_readable_tmpfiles = True
benpro added the
bug
label 2019-08-14 10:16:07 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/ansible-roles#7
No description provided.