Do not provision neutron config when not needed

With [1] we merged not installing neutron venv and packages
when it's not required, for example on ovn_northd. At the same
time we still try to provision config files that are not needed there.
Moreover, role is failing as smart_sources bits are relying on neutron venv
existance.

[1] https://review.opendev.org/c/openstack/openstack-ansible-os_neutron/+/863546

Change-Id: I59050f09577df790119e552e39cd38463755b36f
This commit is contained in:
Dmitriy Rabotyagov 2022-12-09 10:11:00 +01:00 committed by Dmitriy Rabotyagov
parent fa974be047
commit 3faa793469

View File

@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Preparing neutron config
when:
- ((filtered_neutron_services|length) + (uwsgi_neutron_services|length)) > 0
block:
- name: Create plugins neutron dir
file:
path: "{{ item.path | default(omit) }}"
@ -94,7 +98,6 @@
state: link
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"