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:
parent
786bf4e138
commit
e25775ed59
1 changed files with 12 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue