From e74d486424bb57c845621a4d6885da98b699c5a6 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Thu, 3 Nov 2022 13:39:01 -0400 Subject: [PATCH] Do not install neutron venv if not needed. Change-Id: I3675cbb5e7e9b37fce47d995e69edde945c1b581 --- tasks/neutron_install.yml | 4 +++- tasks/neutron_post_install.yml | 4 +++- tasks/neutron_pre_install.yml | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 9ec30329..ca9a3541 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -86,7 +86,9 @@ - section: "neutron" option: "venv_tag" value: "{{ neutron_venv_tag }}" - when: neutron_install_method == 'source' + when: + - neutron_install_method == 'source' + - ((filtered_neutron_services|length) + (uwsgi_neutron_services|length)) > 0 - name: Initialise the upgrade facts ini_file: diff --git a/tasks/neutron_post_install.yml b/tasks/neutron_post_install.yml index 2da8f64b..a993509b 100644 --- a/tasks/neutron_post_install.yml +++ b/tasks/neutron_post_install.yml @@ -92,7 +92,9 @@ src: "{{ neutron_bin }}/neutron-keepalived-state-change" dest: "/usr/local/bin/neutron-keepalived-state-change" state: link - when: neutron_install_method == 'source' + when: + - neutron_install_method == 'source' + - ((filtered_neutron_services|length) + (uwsgi_neutron_services|length)) > 0 - name: Preserve original configuration file(s) command: "cp {{ item.target_f }} {{ item.target_f }}.original" diff --git a/tasks/neutron_pre_install.yml b/tasks/neutron_pre_install.yml index f9da30a4..2f00ae33 100644 --- a/tasks/neutron_pre_install.yml +++ b/tasks/neutron_pre_install.yml @@ -49,6 +49,7 @@ neutron_conf_dir_stat.stat.isdir when: - neutron_install_method == 'source' + - ((filtered_neutron_services|length) + (uwsgi_neutron_services|length)) > 0 - name: Create neutron dir file: