thx,
> On 10/17/2021 7:28 PM Dick Visser <dick.vis...@geant.org> wrote: > > > > > On Sun, 17 Oct 2021 at 17:47, dulhaver via Ansible Project > <ansible-project@googlegroups.com mailto:ansible-project@googlegroups.com > > wrote: > > > > I have a task to create an initial postgres databa > (initdb) in a playbook installing postgresql from a tar.gz archive on a > centos7 target > > > > > > ################################################################### > > - name: configure postgres - create database > > command:/opt/db/postgres/postgresql/src/bin/initdb -D > > /opt/db/data/postgres/data > > args: > > creates: /opt/db/data/postgres/PG_VERSION" > > become: yes > > become_user: postgres > > > > ################################################################### > > > > playbook execution throws the following error at me: > > > > > > ################################################################### > > TASK [configure postgres - create database] > > ************************************************** > > fatal: [vm-0179]: FAILED! => changed=false > > cmd: /opt/db/postgres/postgresql/src/bin/initdb -D > > /opt/db/data/postgres/data > > msg: '[Errno 13] Permission denied' > > rc: 13 > > > > ################################################################### > > > > I read this as the user running that task (postgres) may not have > > rw permissions to the parent directory > > > > however this indicates somethin else > > > > ################################################################### > > > ls -l /opt/db/data/postgres/ > > drwxr-x---. 2 postgres postgres 6 14. Okt 10:34 data > > > > > > > There is a trailing dot, which indicates some SElinux security context. > That may prevent your task from completing > As this is an exercise in Ansible and not SELinux I am trying to put selinux to permissive for the time being. This fails via ansible, but even if I do it manually on the target the initdb TASK still does not go through. So I am wondering whether it is something else here is the full error https://pastebin.com/3j7YPRZT -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/512118255.143264.1634551477237%40office.mailbox.org.