rhevm-qe-automation / ovirt-ansible

Ansible playbooks for ovirt management
GNU General Public License v3.0
26 stars 28 forks source link

Fix issue: Postgres95 vars not loaded for RH env #152

Closed mordechai closed 7 years ago

mordechai commented 7 years ago

The condition

ansible_distribution in ('CentOS', 'Red Hat')

will evaluate to false as ansible_distribution returns 'RedHat' on RH systems and not "Red Hat". This issue prevents the right variables from being loaded in addition to mistakenly skipping certain tasks. To resolve this 'Red Hat' was replaced with 'RedHat'

Here we can see the debug statement showing the variables for ansible_distrubtion check for 'Red Hat' and 'Redhat'

- debug:
    msg: "ansible_distribution in ('CentOS', 'RedHat') => {{ansible_distribution in ('CentOS', 'RedHat')}} and ansible_distribution => {{ansible_distribution}} "

- debug:
    msg: "ansible_distribution in ('CentOS', 'Red Hat') => {{ansible_distribution in ('CentOS', 'Red Hat')}} and ansible_distribution => {{ansible_distribution}} "

TASK [ovirt-engine-remote-db : debug] **** task path: /tmp/ovirt-ansible/roles/ovirt-engine-remote-db/tasks/main.yml:8 ok: [redacted_host_name] => { "msg": "ansible_distribution in ('CentOS', 'RedHat') => True and ansible_distribution => RedHat " }

TASK [ovirt-engine-remote-db : debug] **** task path: /tmp/ovirt-ansible/roles/ovirt-engine-remote-db/tasks/main.yml:11 ok: [redacted_host_name] => { "msg": "ansible_distribution in ('CentOS', 'Red Hat') => False and ansible_distribution => RedHat "

lukas-bednar commented 7 years ago

Thanks!