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
###################################################################

an anybody advise what I may be missing here?

-- 
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/2145117367.135820.1634485640874%40office.mailbox.org.

Reply via email to