mcapi_proxy: ensure proxy service restarts when venv changes

Previously the service would only restart if the systemd unit
was modified. If the venv was changed in-place, this would not
trigger a restart.

Change-Id: I685bedef4d84bf718aaa9064a20d3c1b71daf5bf
This commit is contained in:
Andrew Bonney 2024-08-29 09:01:54 +01:00
parent 818df7b1a8
commit f0992b8d0d
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,24 @@
---
# Copyright 2024, BBC R&D
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Restart magnum_cluster_api_proxy service
systemd:
name: "magnum-cluster-api-proxy"
enabled: yes
state: "restarted"
daemon_reload: yes
listen:
- "venv changed"
- "systemd service changed"

View File

@ -86,7 +86,6 @@
vars:
systemd_user_name: "{{ magnum_cluster_api_proxy_system_user_name }}"
systemd_group_name: "{{ magnum_cluster_api_proxy_system_group_name }}"
systemd_service_restart_changed: true
systemd_tempd_prefix: openstack
systemd_slice_name: magnum-cluster-api-proxy
systemd_lock_path: /var/lock/magnum-cluster-api-proxy