-
Notifications
You must be signed in to change notification settings - Fork 573
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
Support configuration for postgres deployments in docker (#3) #213
base: master
Are you sure you want to change the base?
Conversation
This is kind of exciting. Can you provide some guidance on installing this? Do we want to consider auto detecting docker based on the presence of |
The use case is for when you run postgres in a docker container and you want to manage its configuration with ansible. You have to set For that you need a user to be able to connect postgres with md5 access rather than trust, so you need to provide a host an admin user and a password. The About the |
added an improvement, to handle the case where the docker exported postgresql port is different than the container internal postgres port (the internal should usually stay at 5432). @otakup0pe any wishes, before we could get the PR merged? |
Sorry for the delay, I'll have time to test this over the next week ! I'd love to figure out how to start testing docker + not-docker in the same travis build. |
@otakup0pe ever considered I searched ANXS github, found 1 hit, in a ANXS |
ping :) |
I've started looking int molecule, but will need someone else to take the lead on the postgres role. I'll probably try it out first on the nodejs or erlang roles. If we can get the README updated, I can merge this as-is, probably as a minor version bump as it doesn't seem to involve breaking changes |
* Changes to support docker deployments * Removing logic from template files * Remove syntax errors for indenation/spaces * Reducing duplication for docker and non-docker deployments * Empty dictionary for admin_pwd in non-docker * Add postgresql_login_port
I rebased the PR completely on the master branch to resolve all conflicts and to solve some syntax issues. The indentation/spacing here is wrong and Ansible just complains: https://github.com/ANXS/postgresql/blob/master/tasks/install_yum.yml#L6 |
@otakup0pe any chance for a review/merge? |
The second commit adds an additional "roles" field for each user, which contains the additional roles the user (role) must be a member of. Example:
In the above case, by setting the This commit is here because is for both normal and dockerized deployments of PostgreSQL. |
New
postgresql_docker_mode
that allows the configuration of a dockerized postgres instance that is using a host-mounted volume for data (i.e., data is accessible from the host running docker).