- name: Placeholder for the undercloud pre-tasks
  hosts: undercloud
  gather_facts: yes
  tags: init
  any_errors_fatal: true
  tasks:
       - name: Install pre-defined Undercloud packages for OSP < 13
         yum:
             name: "{{ install.undercloud.packages }}"
             state: present
         become: true
         when:
             - install.undercloud is defined
             - install.undercloud.packages
             - install.version|default(undercloud_version)|openstack_release < 13

       - name: Workaround for ceph-ansible brew job to install packages into mistral-executor container on UC for OSP 13+
         shell: |
           set -ex
           docker exec --user root mistral_executor yum localinstall -y "{{ install.undercloud.packages }}"
           docker restart mistral_executor
           docker ps -l
         become: true
         when:
             - install.undercloud is defined
             - install.undercloud.packages
             - install.version|default(undercloud_version)|openstack_release >= 14

- name: Placeholder for the undercloud pre-tasks
  hosts: undercloud
  gather_facts: yes
  tags: init
  any_errors_fatal: true
  tasks:
       - name: Install pre-defined Undercloud packages for OSP <= 13
         yum:
             name: "{{ install.undercloud.packages }}"
             state: present
         become: true
         when:
             - install.undercloud is defined
             - install.undercloud.packages
             - install.version|default(undercloud_version)|openstack_release <= 13

       - name: Workaround for ceph-ansible brew job to install packages into mistral-executor container on UC for OSP 13+
         shell: |
           set -ex
           docker exec --user root mistral_executor yum localinstall -y "{{ install.undercloud.packages }}"
           docker restart mistral_executor
           docker ps -l
         become: true
         when:
             - install.undercloud is defined
             - install.undercloud.packages
             - install.version|default(undercloud_version)|openstack_release >= 14

Fix condition for UC packages installation.
Fix condition for UC packages installation.

The tripleo-overcloud plugin allows installing custom packages
into the undercloud node (with --undercloud-packages flag).

This patch fixes condition that checks if those packages
should be installed into the undercloud machine itself or
into the containers. For OSP13 and below (including OSP13)
we need to install packages to the machine.

RHOSINFRA-2126

Change-Id: Ibd0c983557df2948fdc9239c2cf886e9438f1a43
