ansible-role-netbox
ansible-role-netbox copied to clipboard
postgresql database creation: failed to change ownership of ansible temporary files
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
I have this bug to, but it is ok when use mitogen
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.
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).
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