ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
849 stars 573 forks source link

Ubuntu 19.04 compatibility - partial initial success #461

Closed velis74 closed 6 months ago

velis74 commented 4 years ago

Just writing to let you know that I have successfully used this role on ubuntu 19.04.

What I observed: On a fresh ubuntu install but postgresql-client manually pre-installed, I ended up with two postgresql instances running. One was ubuntu's 11 and the other was this role's 12, set on port 5433 - presumably because 5432 was taken already. I am currently not sure whether the 11 was installed by this role or inadvertently by me. This in turn made the binary vs database check always fail.

However, I only noticed this after the role kept telling me that there was a binary vs database version mismatch - restart needed. So I went into the VM, made an apt upgrade and THEN rebooted. Before the reboot, it was a 11.5 (bin) vs 11.6 (DB) mismatch, after the reboot it was 12 (bin) vs 11.6 (DB) mismatch.

I ended up manually purging everyting postgresql-related and then the role set up everything just like I wanted it to.

Just letting you know so you can add 19.04 to "works maybe list". I will retry with a "cleaner" and more closely inspected deploy next, then move to 18.04 to try there as well.

Both of the above pending a successful pgbouncer install, so hopefully still today.

However, two possible improvements seem to be suggested with this experience:

  1. It would be cool if the role could check the actual port the installed instance is using. Since there's a default listed in the configs, there should be a warning that it's already being used. An error would be even better since we can't ensure that our instance would be running on the desired port.
  2. There's no check that there's an existing postgresql instance running that is not using our repository.

I am somewhat confident I could add both checks myself (make a PR), but I would appreciate pointers as to where they would be preferred. Please note that I am fresh to Ansible, but not to bash / ubuntu, so pointers should be relatively clear about the ansible part (which file, place within it).

velis74 commented 4 years ago

Oh, and another comment: there was also an issue at the binary vs DB version check where ansible initially errored out with "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user...".

I had to do the standard stuff to make this work, but a possibility of this issue arising was not detected by me in your documentation.

velis74 commented 4 years ago

Updating to confirm this role working on ubuntu 18.04 LTS.

Edit: the things tested are users & database creation, a few variable overrides.

github-actions[bot] commented 8 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

github-actions[bot] commented 6 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.