---
- name: Install packages required for 'pxe_ipmitool' ironic's driver on RedHat based distros
  become: true
  package:
      name:
        - python-setuptools
        - ipmitool
      state: latest
      disable_gpg_check: yes

- name: Install python-virtualbmc from repo's
  become: true
  package:
      name: python-virtualbmc
      state: latest
      disable_gpg_check: yes
  ignore_errors: yes
  register: virtualbmc_install_result

- block:
    - name: Install packages required for python-virtualbmc pip package
      become: true
      package:
          name:
            - gcc
            - libvirt
            - libvirt-devel
            - python-devel
          state: latest
          disable_gpg_check: yes

    - name: install pip
      become: yes
      easy_install:
          name: pip

    - name: Install python-virtualbmc with pip
      become: true
      pip:
          name: virtualbmc
          version: 1.3.0
          #TODO(ovorobio) need propper fix for latest version of package
          extra_args: --no-cache-dir
      #TODO(skatlapa): https://github.com/pypa/pip/issues/5250
  when: virtualbmc_install_result|failed

---
- name: Install packages required for 'pxe_ipmitool' ironic's driver on RedHat based distros
  become: true
  package:
      name:
        - python-setuptools
        - ipmitool
      state: latest
      disable_gpg_check: yes

- name: Install python-virtualbmc from repo's
  become: true
  package:
      name: python-virtualbmc
      state: latest
      disable_gpg_check: yes
  ignore_errors: yes
  register: virtualbmc_install_result

- block:
    - name: Install packages required for python-virtualbmc pip package
      become: true
      package:
          name:
            - gcc
            - libvirt
            - libvirt-devel
            - python-devel
          state: latest
          disable_gpg_check: yes

    - name: install pip
      become: yes
      easy_install:
          name: pip

    - name: Install python-virtualbmc with pip
      become: true
      pip:
          name: virtualbmc
          state: latest
          extra_args: --no-cache-dir
      #TODO(skatlapa): https://github.com/pypa/pip/issues/5250
  when: virtualbmc_install_result|failed

Patch to enable latest virtualbmc
Patch to enable latest virtualbmc

Customized job run sucessfuly deployed with latest version of a package:

https://rhos-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/OSPD-Customized-Deployment-virt/6028/

Change-Id: Ibc5106ef8a312d93848a9321441c35425eac3cc5
