ironic-python-agent-builder/roles/ipa-build-dib-image/tasks/install.yaml
Dmitry Tantsur 683feac160 Fix and return the CentOS 7 job
This job is used on stable branches and is currently broken. This
change introduces a workaround for older DIB and re-enables the job.

Change-Id: I100576c639649a69a8e95463ca87bedda4bbadc3
2020-01-20 16:08:56 +01:00

39 lines
1.6 KiB
YAML

- name: Install binary dependencies from diskimage-builder
include_role:
name: bindep
vars:
bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}"
- name: Install ironic-python-agent-builder
pip:
name: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/ironic-python-agent-builder'].src_dir }}"
extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
become: true
# NOTE(dtantsur): installing requirements separately since DIB itself is in
# upper-constraints and source installations cannot be constrained.
- name: Install requirements for DIB (if installing from source)
pip:
requirements: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}/requirements.txt"
extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
become: true
when: dib_from_source
- name: Install DIB (if installing from source)
pip:
name: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}"
become: true
when: dib_from_source
# NOTE(dtantsur): work around the issue in older DIB versions when some
# elements try to use the default Python instead of the one DIB is using,
# failing with "No module named yaml"
- name: Install PyYAML in Python 2
pip:
name: PyYAML
extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
executable: pip2
become: true
ignore_errors: true