- name: Select python version to build
  set_fact:
    wheel_python: "python{{ inventory_hostname[-1] }}"

- name: Ensure old version of wheel dir is gone
  file:
    path: "{{ wheel_dir }}"
    state: absent

- name: Ensure wheel dir exists
  file:
    path: "{{ wheel_dir }}"
    state: directory

- name: Build the wheel mirror
  shell: bash -x scripts/wheel-build.sh {{ wheel_dir }} {{ wheel_python }}

- name: Select python version to build
  set_fact:
    wheel_python: "python{{ inventory_hostname[-1] }}"

- name: Ensure wheel dir exists
  file:
    path: "{{ wheel_dir }}"
    state: directory
  become: yes

- name: Build the wheel mirror
  shell: bash -x scripts/wheel-build.sh {{ wheel_dir }} {{ wheel_python }}

Use sudo when making sure /opt/wheel exists
Use sudo when making sure /opt/wheel exists

We need sudo permissons to create /opt/wheel for build-wheel-mirror
jobs.

Change-Id: I3676a82ee8b0a7bb06896b79bdf26f61d9b75534
Signed-off-by: Paul Belanger <e7139c8e6c4ea75cc1c287ce081b2dc0f3ab39ec@redhat.com>
