From e253b877f84317006c0d1fc741775498d87f52e3 Mon Sep 17 00:00:00 2001 From: Logan V Date: Fri, 13 Jan 2017 19:59:51 -0600 Subject: [PATCH] Cleanup of developer mode logic Further decoupling of the developer mode conditional logic from the cached venv deployment tasks. Change-Id: I429644ed695930533ee0b06d93bbad064a73b89f --- tasks/keystone_install.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tasks/keystone_install.yml b/tasks/keystone_install.yml index 1c6254dc..f6a323fb 100644 --- a/tasks/keystone_install.yml +++ b/tasks/keystone_install.yml @@ -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