Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom data directory only works on redhat #236

Open
macnibblet opened this issue Apr 4, 2017 · 6 comments
Open

Custom data directory only works on redhat #236

macnibblet opened this issue Apr 4, 2017 · 6 comments

Comments

@macnibblet
Copy link

I tried changing the data directory on a ubuntu install, and it failed miserably, read the playbook. only supported on redhat.

@briandbecker
Copy link

@macnibblet I had the same issue; I forked and got it working so feel free to take a look: https://github.com/briandbecker/ansible-role-postgresql

@merifri
Copy link

merifri commented Apr 10, 2017

@macnibblet , what about postgresql_cluster_reset variable? You can set it to true and cluster will be created in new postgresql_data_directory (if cluster exists, it will be dropped):
https://github.com/ANXS/postgresql/blob/master/tasks/configure.yml#L36-L49

Tested on Debian and Ubuntu.

@corford
Copy link
Contributor

corford commented Apr 16, 2017

@merifri Haven't tested but reading the source, I don't think setting postgresql_cluster_reset=true will drop an existing cluster (under Debian). The task that drops the cluster checks for 'pgdata_dir_exist.changed' before running (which will be false if the data data directory already exists).

@corford
Copy link
Contributor

corford commented Apr 16, 2017

@macnibblet it's supposed to be supported on Debian but I couldn't get it working on Ubuntu (xenial). Issue seems to be with pg_createcluster and pg_dropcluster commands in tasks/configure.yml. I've made a pull request with the fix that worked for me here: #237

@aoyawale
Copy link
Contributor

is this still an issue?

@gclough
Copy link
Collaborator

gclough commented Apr 3, 2018

I tried using a non-standard directory on Debian 14.04 today, and it broke. :o( Once we get #288 merged, then we can add this to the Travis tests, and confirm it's working or broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants