Files
openstack-ansible-os_skyline/handlers/main.yml
Dmitriy Rabotyagov 966329644d Re-add Zuul testing to the project
Zuul configuration file has been dropped from the project [1] during
import to opendev as a pre-requisite.

We re-add it now to be able to merge changes to the role.

[1] https://github.com/jrosser/openstack-ansible-os_skyline/pull/2

Change-Id: I0f5a4de5d273014951e48b82703a042e74118ab1
2024-03-16 09:38:03 +00:00

55 lines
1.4 KiB
YAML

---
# Copyright 2022, 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: Stop services
service:
name: "{{ item.service_name }}"
enabled: yes
state: "stopped"
daemon_reload: yes
loop: "{{ filtered_skyline_services }}"
register: _stop
until: _stop is success
retries: 5
delay: 2
listen:
- "Restart skyline services"
- "venv changed"
- name: Start services
service:
name: "{{ item.service_name }}"
enabled: yes
state: "started"
daemon_reload: yes
loop: "{{ filtered_skyline_services }}"
register: _start
until: _start is success
retries: 5
delay: 2
listen:
- "Restart skyline services"
- "venv changed"
- name: Restart web server
service:
name: "{{ skyline_system_service_name }}"
enabled: yes
state: "restarted"
daemon_reload: "{{ (ansible_facts['service_mgr'] == 'systemd') | ternary('yes', omit) }}"
listen:
- "venv changed"