---
- name: Find configuration file for SCL PostgreSQL
  shell: ls -vr1 /etc/ovirt-engine/engine.conf.d/*-scl-postgres-*.conf
  environment: "{{ CMD_LANG }}"
  register: scl_pg_conf_flist
  changed_when: True
- debug: var=scl_conf_flist
- name: Check SCL PostgreSQL value
  command: grep sclenv {{ scl_pg_conf_flist.stdout_lines|first }}
  environment: "{{ CMD_LANG }}"
  register: scl_pg_conf
  changed_when: True
- debug: var=scl_pg_conf
- name: Set SCL prefix for PostgreSQL
  set_fact: scl_pg_prefix="scl enable {{ scl_pg_conf.stdout_lines[0].split('=')[1].replace('\"','') }} -- "
---
- name: Find configuration file for SCL PostgreSQL
  shell: ls -vr1 /etc/ovirt-engine/engine.conf.d/*-scl-postgres*.conf
  environment: "{{ CMD_LANG }}"
  register: scl_pg_conf_flist
  changed_when: True
- debug: var=scl_conf_flist
- name: Check SCL PostgreSQL value
  command: grep sclenv {{ scl_pg_conf_flist.stdout_lines|first }}
  environment: "{{ CMD_LANG }}"
  register: scl_pg_conf
  changed_when: True
- debug: var=scl_pg_conf
- name: Set SCL prefix for PostgreSQL
  set_fact: scl_pg_prefix="scl enable {{ scl_pg_conf.stdout_lines[0].split('=')[1].replace('\"','') }} -- "

Fix scl configuration file naming for 4.3
Fix scl configuration file naming for 4.3

In 4.2 scl configuration variables for
postgres 9.5 were in a file called
/etc/ovirt-engine/engine.conf.d/10-scl-postgres-95.conf .
oVirt 4.3 instead requires postgres 10
and that file has been renamed as
/etc/ovirt-engine/engine.conf.d/10-scl-postgres.conf .
Fixing aggordingly to that.

Change-Id: I34526ec1c29e7d89de228df704ad91c5cb5001b7
Signed-off-by: Simone Tiraboschi <cb03129c66ba4da7ba7044049d0f43907bf857bb@redhat.com>
