tripleo-ansible/tripleo_ansible/roles/tripleo_ovn_cluster/tasks/restart.yml
Carlos Goncalves f1ecdd02c1 Add tripleo_ovn_cluster role
We introduce support for running both the NB and SB OVN databases in
clustered mode. This OVN DBs clustered mode is based on OVN's own
clustering protocol and does not rely on pacemaker.

THT service: https://review.opendev.org/775444

Co-Authored-By: Michele Baldessari <michele@acksyn.org>
Change-Id: I5baa697ae351d10e53f7cf70641fe0eecede507f
2021-05-03 15:50:16 +02:00

30 lines
931 B
YAML

---
# Copyright 2021 Red Hat, Inc.
# All Rights Reserved.
#
# 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: check if {{ item }} systemd service is active
become: true
shell: "systemctl is-active --quiet {{ item }}"
failed_when: false
register: ovn_active_service
- name: restart {{ item }} systemd service
become: true
systemd:
name: "{{ item }}"
state: restarted
when:
- ovn_active_service.rc == 0