Cleanup of developer mode logic

Further decoupling of the developer mode conditional
logic from the cached venv deployment tasks.

Change-Id: Id1593923f4e0d94ab34b7bc61febed2c17a2940c
This commit is contained in:
Logan V 2017-01-13 19:59:51 -06:00
parent 6a6b577be7
commit 27173a75c0
3 changed files with 6 additions and 10 deletions

View File

@ -63,7 +63,7 @@
retries: 5 retries: 5
delay: 2 delay: 2
when: when:
- nova_get_venv | failed or nova_get_venv | skipped or nova_developer_mode | bool - nova_get_venv | failed or nova_get_venv | skipped
tags: tags:
- nova-install - nova-install
- nova-pip-packages - nova-pip-packages

View File

@ -48,7 +48,7 @@
retries: 5 retries: 5
delay: 2 delay: 2
when: when:
- nova_get_venv | failed or nova_get_venv | skipped or nova_developer_mode | bool - nova_get_venv | failed or nova_get_venv | skipped
tags: tags:
- nova-pip-packages - nova-pip-packages

View File

@ -182,6 +182,7 @@
path: "{{ nova_bin | dirname }}" path: "{{ nova_bin | dirname }}"
state: directory state: directory
register: nova_venv_dir register: nova_venv_dir
when: nova_get_venv | changed
tags: tags:
- nova-pip-packages - nova-pip-packages
@ -190,9 +191,7 @@
src: "/var/cache/{{ nova_venv_download_url | basename }}" src: "/var/cache/{{ nova_venv_download_url | basename }}"
dest: "{{ nova_bin | dirname }}" dest: "{{ nova_bin | dirname }}"
copy: "no" copy: "no"
when: when: nova_get_venv | changed
- not nova_developer_mode | bool
- nova_get_venv | changed
notify: Restart nova services notify: Restart nova services
tags: tags:
- nova-pip-packages - nova-pip-packages
@ -211,7 +210,7 @@
until: install_packages|success until: install_packages|success
retries: 5 retries: 5
delay: 2 delay: 2
when: nova_get_venv | failed or nova_get_venv | skipped or nova_developer_mode | bool when: nova_get_venv | failed or nova_get_venv | skipped
notify: Restart nova services notify: Restart nova services
tags: tags:
- nova-pip-packages - nova-pip-packages
@ -222,15 +221,12 @@
state: "absent" state: "absent"
when: when:
- ansible_pkg_mgr == 'yum' - ansible_pkg_mgr == 'yum'
- not nova_developer_mode | bool
- nova_get_venv | changed - nova_get_venv | changed
- name: Update virtualenv path - name: Update virtualenv path
command: > command: >
virtualenv-tools --update-path=auto --reinitialize {{ nova_bin | dirname }} virtualenv-tools --update-path=auto --reinitialize {{ nova_bin | dirname }}
when: when: nova_get_venv | changed
- not nova_developer_mode | bool
- nova_get_venv | changed
tags: tags:
- nova-pip-packages - nova-pip-packages