How could one adapt this role to install Postgres 9.6 on Centos7/RHEL7?
Something like this should work:
- hosts: all
tasks:
- yum:
name: "https://download.postgresql.org/pub/repos/yum/reporpms/EL-{{ ansible_distribution_major_version }}-x86_64/pgdg-redhat-repo-latest.noarch.rpm"
state: present
become: yes
- import_role:
name: geerlingguy.postgresql
vars:
postgresql_enablerepo: "pgdg96"
postgresql_version: 9.6
postgresql_packages:
- postgresql96
- postgresql96-server
- postgresql96-contrib
- postgresql96-libs
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
become: yes
@kdhlab Beer on me ... Saved me some time :) This needs to be included in the example README.
Great example of var overrides required to run a different version than the defaults for CentOS 7. Worked for me.
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.
Awesome! thanks for this input on this one! I agree, an example for this should be included in the README. :+1:
Most helpful comment
Something like this should work: