--- # 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: create directory {{ tripleo_ovn_cluster_config_basedir }} become: true ansible.builtin.file: path: "{{ tripleo_ovn_cluster_config_basedir }}/etc/sysconfig" recurse: true state: directory selevel: s0 setype: container_file_t - name: set is_ovn_dbs_bootstrap_node fact set_fact: is_ovn_dbs_bootstrap_node: "{{ ovn_dbs_short_bootstrap_node_name|default('')|lower == ansible_facts['hostname']|lower }}" when: is_ovn_dbs_bootstrap_node is undefined - name: render OVN cluster configuration become: true ansible.builtin.template: src: ovn_cluster.j2 dest: "{{ tripleo_ovn_cluster_config_basedir }}/etc/sysconfig/ovn_cluster" mode: '640' selevel: s0 setype: container_file_t register: _ovn_cluster_config_result - name: restart OVN northd and north and south databases include_tasks: restart.yml when: _ovn_cluster_config_result.changed loop: - tripleo_cluster_north_db_server - tripleo_cluster_south_db_server - tripleo_cluster_northd