When installing the postgresql server package, a new cluster will automatically be created (Debian 7 + postgresql.org packages). This prevents this cookbook from executing the resouces specified in postgresql::data_directory.
This also makes https://github.com/phlipper/chef-postgresql/blob/master/attributes/default.rb#L38 useless, e.g. you can't customize the process like enabling the checksum feature which is only configurable at cluster initialization time.
I'm not sure how to solve this, maybe setting create_main_cluster=false in /etc/postgresql-common/createcluster.conf will prevent the package script to init a default cluster. I've seen this in the "official" Dockerfile and also in this chef recipe
Skipping this would allow the already existing recipe postgresql::data_directory to do the job and also respect the custom attributes.
What do you think?