Skip to content
Merged
Prev Previous commit
Next Next commit
Add distro / version specific release numbers to yum URL
  • Loading branch information
Michael Conrad committed Oct 3, 2016
commit 88fdf0bb5473e0c77aa7c3d0fbf9b1b7f0e98d11
35 changes: 34 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,39 @@ postgresql_pgdg_dists:
Scientific: sl
SLC: sl
OracleLinux: oraclelinux
postgresql_pgdg_releases:
redhat: {
9.1: 8,
9.2: 9,
9.3: 3,
9.4: 3,
9.5: 3,
9.6: 3,
}
centos: {
9.1: 7,
9.2: 8,
9.3: 3,
9.4: 3,
9.5: 3,
9.6: 3,
}
sl: {
9.1: 8,
9.2: 9,
9.3: 3,
9.4: 3,
9.5: 3,
9.6: 3,
}
oraclelinux: {
9.1: 8,
9.2: 9,
9.3: 3,
9.4: 3,
9.5: 3,
9.6: 3,
}
postgresql_version_terse: "{{ postgresql_version | replace('.', '') }}"
postgresql_yum_repository_base_url: "http://yum.postgresql.org"
postgresql_yum_repository_url: "{{ postgresql_yum_repository_base_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}/pgdg-{{ postgresql_pgdg_dists[ansible_distribution] }}{{ postgresql_version_terse }}-{{ postgresql_version }}-2.noarch.rpm"
postgresql_yum_repository_url: "{{ postgresql_yum_repository_base_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}/pgdg-{{ postgresql_pgdg_dists[ansible_distribution] }}{{ postgresql_version_terse }}-{{ postgresql_version }}-{{ postgresql_pgdg_releases.get(postgresql_pgdg_dists[ansible_distribution]).get(postgresql_version) }}.noarch.rpm"