diff --git a/defaults/main.yml b/defaults/main.yml index 3e1e90a3..0584ef2e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -43,6 +43,9 @@ nova_developer_constraints: nova_venv_tag: untagged nova_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin" +# venv_download, even when true, will use the fallback method of building the +# venv from scratch if the venv download fails. +nova_venv_download: "{{ not nova_developer_mode | bool }}" nova_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/nova.tgz nova_fatal_deprecations: False diff --git a/tasks/nova_compute_kvm_install.yml b/tasks/nova_compute_kvm_install.yml index 6eb9f7c9..996df0d5 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_developer_mode | bool + - not nova_get_venv | success or nova_developer_mode | bool tags: - nova-install - nova-pip-packages diff --git a/tasks/nova_console_novnc_install.yml b/tasks/nova_console_novnc_install.yml index 0b216bfe..7949107e 100644 --- a/tasks/nova_console_novnc_install.yml +++ b/tasks/nova_console_novnc_install.yml @@ -50,7 +50,7 @@ retries: 5 delay: 2 when: - - nova_get_venv | failed or nova_developer_mode | bool + - not nova_get_venv | success or nova_developer_mode | bool tags: - nova-install - nova-pip-packages diff --git a/tasks/nova_install.yml b/tasks/nova_install.yml index e7031f05..881eecaf 100644 --- a/tasks/nova_install.yml +++ b/tasks/nova_install.yml @@ -169,7 +169,7 @@ dest: "/var/cache/{{ nova_venv_download_url | basename }}" checksum: "sha1:{{ lookup('url', nova_venv_download_url | replace('tgz', 'checksum')) }}" register: nova_get_venv - when: not nova_developer_mode | bool + when: nova_venv_download | bool tags: - nova-install - nova-pip-packages @@ -199,7 +199,7 @@ copy: "no" when: - not nova_developer_mode | bool - - nova_get_venv | changed or nova_venv_dir | changed + - nova_get_venv | changed notify: Restart nova services tags: - nova-install @@ -219,7 +219,7 @@ until: install_packages|success retries: 5 delay: 2 - when: nova_developer_mode | bool + when: not nova_get_venv | success or nova_developer_mode | bool notify: Restart nova services tags: - nova-install