postgresql: fix db-fas01.stg breakage from playbook runs

In prod db-fas01 is rhel7 and uses postgresql 9.6.
In staging db-fas01.stg is rhel8, and should also use postgresql 9.6,
but we were blanket making rhel8 hosts use postgresql 12.
We could drop this by reinstalling db-fas01.stg with rhel7, or waiting
until we finally kill fas2 and just setting them both to use postgresql
12.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2021-07-26 13:53:56 -07:00
parent 786bf4e138
commit e25775ed59

View file

@ -39,7 +39,18 @@
stream=12
profiles=
state=enabled
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == 'RedHat'
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == 'RedHat' and not inventory_hostname.startswith('db-fas01.stg')
- name: on db-fas01.stg enable the postgresql 9.6 module.
copy:
dest: /etc/dnf/modules.d/postgresql.module
content: |
[postgresql]
name=postgresql
stream=9.6
profiles=
state=enabled
when: inventory_hostname.startswith('db-fas01.stg')
- name: install postgresql server packages (dnf)
package: