Merge "Clean up developer mode logic"
This commit is contained in:
commit
dc9dd4f772
@ -36,6 +36,9 @@ rally_developer_constraints:
|
|||||||
rally_venv_tag: untagged
|
rally_venv_tag: untagged
|
||||||
rally_bin: "/openstack/venvs/rally-{{ rally_venv_tag }}/bin"
|
rally_bin: "/openstack/venvs/rally-{{ rally_venv_tag }}/bin"
|
||||||
|
|
||||||
|
# venv_download, even when true, will use the fallback method of building the
|
||||||
|
# venv from scratch if the venv download fails.
|
||||||
|
rally_venv_download: "{{ not rally_developer_mode | bool }}"
|
||||||
rally_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/rally.tgz
|
rally_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/rally.tgz
|
||||||
|
|
||||||
# Database vars
|
# Database vars
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
dest: "/var/cache/{{ rally_venv_download_url | basename }}"
|
dest: "/var/cache/{{ rally_venv_download_url | basename }}"
|
||||||
checksum: "sha1:{{ lookup('url', rally_venv_download_url | replace('tgz', 'checksum')) }}"
|
checksum: "sha1:{{ lookup('url', rally_venv_download_url | replace('tgz', 'checksum')) }}"
|
||||||
register: rally_get_venv
|
register: rally_get_venv
|
||||||
when: not rally_developer_mode | bool
|
when: rally_venv_download | bool
|
||||||
|
|
||||||
- name: Remove existing venv
|
- name: Remove existing venv
|
||||||
file:
|
file:
|
||||||
@ -56,16 +56,14 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ rally_bin | dirname }}"
|
path: "{{ rally_bin | dirname }}"
|
||||||
state: directory
|
state: directory
|
||||||
register: rally_venv_dir
|
when: rally_get_venv | changed
|
||||||
|
|
||||||
- name: Unarchive pre-built venv
|
- name: Unarchive pre-built venv
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "/var/cache/{{ rally_venv_download_url | basename }}"
|
src: "/var/cache/{{ rally_venv_download_url | basename }}"
|
||||||
dest: "{{ rally_bin | dirname }}"
|
dest: "{{ rally_bin | dirname }}"
|
||||||
copy: "no"
|
copy: "no"
|
||||||
when:
|
when: rally_get_venv | changed
|
||||||
- not rally_developer_mode | bool
|
|
||||||
- rally_get_venv | changed or rally_venv_dir | changed
|
|
||||||
|
|
||||||
- name: Install pip packages
|
- name: Install pip packages
|
||||||
pip:
|
pip:
|
||||||
@ -81,7 +79,7 @@
|
|||||||
until: install_packages|success
|
until: install_packages|success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
when: rally_developer_mode | bool
|
when: rally_get_venv | failed or rally_get_venv | skipped
|
||||||
|
|
||||||
- name: CentOS remove python from path first
|
- name: CentOS remove python from path first
|
||||||
file:
|
file:
|
||||||
@ -89,12 +87,9 @@
|
|||||||
state: "absent"
|
state: "absent"
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'yum'
|
- ansible_pkg_mgr == 'yum'
|
||||||
- not rally_developer_mode | bool
|
- rally_get_venv | changed
|
||||||
- rally_get_venv | changed or rally_venv_dir | changed
|
|
||||||
|
|
||||||
- name: Update virtualenv path
|
- name: Update virtualenv path
|
||||||
command: >
|
command: >
|
||||||
virtualenv-tools --update-path=auto --reinitialize {{ rally_bin | dirname }}
|
virtualenv-tools --update-path=auto --reinitialize {{ rally_bin | dirname }}
|
||||||
when:
|
when: rally_get_venv | changed
|
||||||
- not rally_developer_mode | bool
|
|
||||||
- rally_get_venv | changed or rally_venv_dir | changed
|
|
||||||
|
Loading…
Reference in New Issue
Block a user