project-config/roles/build-wheels/tasks/main.yaml
Tony Breeds bd770ada20 Use root user for editing pip.conf
In Icb590e805d0d29130bff99335590d1d0f646e4e4 we added a task to ensure
we don't use our own mirrors for wheel builing.  This updates pip.conf
but isn't execurted as root.  As pip.conf (and /etc) are owned by root
we need to switch to that user for this task.

Without this we see the following failures:
    http://logs.openstack.org/96/594496/2/check/build-wheel-mirror-centos-7/76fba4f/job-output.txt.gz#_2018-10-11_02_07_18_214033

Change-Id: Iee83a463aa9f3d4d45727e3f6c641ce8436b0b83
2018-10-12 15:15:29 +11:00

18 lines
376 B
YAML

- name: Ensure wheel dir exists
file:
group: zuul
owner: zuul
path: "{{ wheel_dir }}"
state: directory
become: yes
- name: Prevent using existing wheel mirror
become: yes
lineinfile:
path: /etc/pip.conf
state: absent
regexp: '^extra-index-url.*$'
- name: Build the wheel mirror
script: wheel-build.sh {{ wheel_dir }} {{ wheel_python }}