From 27173a75c0962b4437f7375b8a8dc344e2a17402 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: Id1593923f4e0d94ab34b7bc61febed2c17a2940c --- tasks/nova_compute_kvm_install.yml | 2 +- tasks/nova_console_novnc_install.yml | 2 +- tasks/nova_install.yml | 12 ++++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tasks/nova_compute_kvm_install.yml b/tasks/nova_compute_kvm_install.yml index d5eab53f..67426cda 100644 --- a/tasks/nova_compute_kvm_install.yml +++ b/tasks/nova_compute_kvm_install.yml @@ -63,7 +63,7 @@ retries: 5 delay: 2 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: - nova-install - nova-pip-packages diff --git a/tasks/nova_console_novnc_install.yml b/tasks/nova_console_novnc_install.yml index 3db92b7a..8a7acaea 100644 --- a/tasks/nova_console_novnc_install.yml +++ b/tasks/nova_console_novnc_install.yml @@ -48,7 +48,7 @@ retries: 5 delay: 2 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: - nova-pip-packages diff --git a/tasks/nova_install.yml b/tasks/nova_install.yml index e89b0efa..9fcfcb9b 100644 --- a/tasks/nova_install.yml +++ b/tasks/nova_install.yml @@ -182,6 +182,7 @@ path: "{{ nova_bin | dirname }}" state: directory register: nova_venv_dir + when: nova_get_venv | changed tags: - nova-pip-packages @@ -190,9 +191,7 @@ src: "/var/cache/{{ nova_venv_download_url | basename }}" dest: "{{ nova_bin | dirname }}" copy: "no" - when: - - not nova_developer_mode | bool - - nova_get_venv | changed + when: nova_get_venv | changed notify: Restart nova services tags: - nova-pip-packages @@ -211,7 +210,7 @@ until: install_packages|success retries: 5 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 tags: - nova-pip-packages @@ -222,15 +221,12 @@ state: "absent" when: - ansible_pkg_mgr == 'yum' - - not nova_developer_mode | bool - nova_get_venv | changed - name: Update virtualenv path command: > virtualenv-tools --update-path=auto --reinitialize {{ nova_bin | dirname }} - when: - - not nova_developer_mode | bool - - nova_get_venv | changed + when: nova_get_venv | changed tags: - nova-pip-packages