-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Can't change postgres_version #145
Comments
Also noticed this on Debian 10
|
@geerlingguy is it possible to specify a custom psql version that will be installed via this ansible role? ProblemThis role does not support installing custom PSQL version to the destination platform. Notes
The default PSQL version is defined in ExamplePlatform:
Playbook: ---
- hosts: container # src: https://hub.docker.com/r/europ/docker-centos-sshd-systemd
gather_facts: true
tasks:
- block: # workaround, see https://stackoverflow.com/a/56558842
- name: PSQL installation and configuration
include_role:
name: geerlingguy.postgresql
vars:
postgresql_users:
- name: abc
password: abc
postgresql_databases:
- name: xyz
postgresql_version: "10.4" # override psql-9.2 with custom version (psql-10.4)
become: true Result: psql -V
# psql (PostgreSQL) 9.2.24 |
Same for me on debian 10 .... |
Hello. I'm not 100% sure of this but if you specify a different version of PostgreSQL using For example, in my CentOS 6 test environment, I wanted to install PostgreSQL v9.6. That version of PostgreSQL is not in the standard CentOS repositories. The highest version of PostgreSQL in the standard CentOS repositories is I believe v8.4. These playbooks by Jeff only use the default repositories. Verify that the version of PostgreSQL you wish to install is in the repositories enabled on your server. In my case, I had to install the official PostgreSQL v9.6 yum repositories before configuring the role: - name: Install PostgreSQL 9.6 Repository
yum_repository:
name: postgresql96
baseurl: https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-$releasever-$basearch
enabled: True
file: postgresql96
description: PostgreSQL 9.6 for RHEL/CentOS $releasever - $basearch
gpgcheck: False I added the following variables to postgres_users_no_log: false # not needed; enabled for troubleshooting
postgresql_version: "9.6"
postgresql_data_dir: /var/lib/pgsql/9.6/data
postgresql_bin_path: /usr/pgsql-9.6/bin
postgresql_config_path: /var/lib/pgsql/9.6/data
postgresql_daemon: postgresql-9.6
postgresql_packages:
- postgresql96
- postgresql96-libs
- postgresql96-server Once you have all these variables defined, it will hopefully work for you as well. |
note for postgresql 10, you need to add the right repo in first |
For me it also blindly installs postgres 13 when |
The version is not changing because it's hardoded there for example:
|
I've created #156 , hopefully it gets approved and merged. Meanwhile it can be used with |
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! Please read this blog post to see the reasons why I mark issues as stale. |
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. |
Adding var postgresql_version: "12" doesn't change actual version which was installed in VM with Ubuntu 18.
The text was updated successfully, but these errors were encountered: