ansible-role-netbox icon indicating copy to clipboard operation
ansible-role-netbox copied to clipboard

postgresql database creation: failed to change ownership of ansible temporary files

Open bpetit opened this issue 7 years ago • 4 comments
trafficstars

Hi,

On a simple run (calling the role with no option) I get this error:

TASK [netbox : create postgresql database] *************************************************************************************************************************************************
fatal: [ec2-myinstance.eu-west-2.compute.amazonaws.com]: FAILED! => {"msg": "Failed to change ownership of the temporary files Ansible needs to create despite connecting as a privileged user. Unprivileged become user would be unable to read the file."}

I think this is related to an open issue in ansible, not your role directly, I open the issue to trace it because you could encounter it too.

Here is the thread on the ansible side: https://github.com/ansible/ansible/issues/16052#issuecomment-394326827

bpetit avatar Jun 04 '18 11:06 bpetit

I have this bug to, but it is ok when use mitogen

Shm013 avatar Feb 03 '20 13:02 Shm013

I solved this problem by installing acl:

- name: Install ACL package
  ansible.builtin.apt:
    name: acl

After the installation I executed it again and it worked.

patriciomartinns avatar Jan 17 '24 19:01 patriciomartinns

Thank you for the role @gmazoyer - very helpful!! I received the same error as @bpetit, and resolved it following @patriciomartinns' suggestion.

For anyone in the future, just be sure to add become: true to that ACL-install task, if your user needs sudo privileges (i forgot at first).

Masked-Kunsiquat avatar Feb 23 '24 15:02 Masked-Kunsiquat

Element to add in __netbox_other_packages of vars/debian-12.yml

__netbox_other_packages:
  - git
  - libxml2-dev
  - libxslt1-dev
  - libffi-dev
  - libjpeg-dev
  - graphviz
  - libssl-dev
  - acl

LLFT avatar Apr 13 '24 08:04 LLFT