Cleanup of developer mode logic

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

Change-Id: I429644ed695930533ee0b06d93bbad064a73b89f
This commit is contained in:
Logan V 2017-01-13 19:59:51 -06:00
parent ec6824fa6b
commit e253b877f8

View File

@ -204,16 +204,14 @@
path: "{{ keystone_bin | dirname }}"
state: directory
register: keystone_venv_dir
when: not keystone_developer_mode | bool
when: keystone_get_venv | changed
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ keystone_venv_download_url | basename }}"
dest: "{{ keystone_bin | dirname }}"
copy: "no"
when:
- not keystone_developer_mode | bool
- keystone_get_venv | changed
when: keystone_get_venv | changed
notify:
- Restart Keystone APIs on first node
- Restart Keystone APIs on other nodes
@ -234,7 +232,7 @@
until: install_packages|success
retries: 5
delay: 2
when: keystone_get_venv | failed or keystone_get_venv | skipped or keystone_developer_mode | bool
when: keystone_get_venv | failed or keystone_get_venv | skipped
notify:
- Restart Keystone APIs on first node
- Restart Keystone APIs on other nodes
@ -247,12 +245,9 @@
state: "absent"
when:
- ansible_pkg_mgr == 'yum'
- not keystone_developer_mode | bool
- keystone_get_venv | changed
- name: Update virtualenv path
command: >
virtualenv-tools --update-path=auto --reinitialize {{ keystone_bin | dirname }}
when:
- not keystone_developer_mode | bool
- keystone_get_venv | changed
when: keystone_get_venv | changed