Fix repo_build_venv_rebuild toggle effectiveness

The repo_build_venv_rebuild toggle is supposed to trigger
a rebuild of the venvs, but currently it does nothing.

This patch fixes that, making it possible to rebuild the
venvs without having to rebuild the wheels too.

Change-Id: I61db1f5555cba2c659ff09d8369ce3c31b011b5d
This commit is contained in:
Jesse Pretorius 2018-04-17 19:09:51 +01:00
parent b7aa8d4eef
commit 81051b0d46
1 changed files with 16 additions and 6 deletions

View File

@ -26,7 +26,8 @@
- "(ansible_local is not defined) or
('openstack_ansible' not in ansible_local) or
('repo_build' not in ansible_local['openstack_ansible']) or
('need_wheel_build' not in ansible_local['openstack_ansible']['repo_build'])"
('need_wheel_build' not in ansible_local['openstack_ansible']['repo_build']) or
('need_venv_build' not in ansible_local['openstack_ansible']['repo_build'])"
- name: Create package directories
file:
@ -65,20 +66,29 @@
dest: "{{ repo_build_release_path }}/requirements_constraints.txt"
register: _wheel_build_constraints
- name: Record whether a wheel/venv build is required
- name: Record whether a wheel build is required
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: repo_build
option: "{{ item }}"
option: "need_wheel_build"
value: True
with_items:
- "need_wheel_build"
- "need_venv_build"
when:
- (_wheel_build_requirements | changed) or
(_wheel_build_constraints | changed) or
(repo_build_wheel_rebuild | bool)
- name: Record whether a venv build is required
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: repo_build
option: "need_venv_build"
value: True
when:
- (_wheel_build_requirements | changed) or
(_wheel_build_constraints | changed) or
(repo_build_wheel_rebuild | bool) or
(repo_build_venv_rebuild | bool)
- name: Install pip packages
pip:
name: "{{ repo_pip_packages }}"