ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
849 stars 573 forks source link

Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user #463

Closed hubitor closed 6 months ago

hubitor commented 4 years ago

I'm getting this error:

TASK [anxs.postgresql : PostgreSQL | Check binary version] ****************************************************
fatal: [appserver]: FAILED! => {"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 '/var/tmp/ansible-tmp-1578784826.169562-122218142055240/': Operation not permitted\nchown: changing ownership of '/var/tmp/ansible-tmp-1578784826.169562-122218142055240/AnsiballZ_command.py': Operation not permitted\n}). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}

PLAY RECAP ****************************************************************************************************
appserver                  : ok=29   changed=0    unreachable=0    failed=1    skipped=63   rescued=0    ignored=0 

for this playbook:

- hosts: appserver
  become: yes
  roles:
    - { role: geerlingguy.nginx }
    - { role: anxs.postgresql }
    - { role: anxs.monit }

and when I check the version:

$ psql -V
psql (PostgreSQL) 12.1 (Debian 12.1-1.pgdg100+1)

although the version in main.yml was 11: postgresql_version: 11

atylerj commented 3 years ago

This happened to me when attempting to load postgres 10 on ubuntu 20.04.

The workaround for me was to install acl

This was my hint, I really don't know any more about this, just sharing https://github.com/georchestra/ansible/issues/55

patsevanton commented 2 years ago

PR for fix set permissions on the temporary files on Ubuntu 20.04 https://github.com/ANXS/postgresql/pull/529

github-actions[bot] commented 8 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

github-actions[bot] commented 6 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.