TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack deployments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

62 lines
1.7 KiB

---
# Copyright 2020 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_frr_config_basedir }}
become: true
ansible.builtin.file:
path: "{{ tripleo_frr_config_basedir }}/etc/frr"
recurse: true
state: directory
selevel: s0
setype: container_file_t
- name: configure FRR
become: true
ansible.builtin.template:
src: frr.conf.j2
dest: "{{ tripleo_frr_config_basedir }}/etc/frr/frr.conf"
mode: '640'
selevel: s0
setype: container_file_t
register: _frr_config_result
- name: configure FRR daemons
become: true
ansible.builtin.template:
src: daemons.j2
dest: "{{ tripleo_frr_config_basedir }}/etc/frr/daemons"
mode: '640'
selevel: s0
setype: container_file_t
register: _frr_daemons_result
- name: restart FRR
when:
- _frr_config_result.changed or _frr_daemons_result.changed
block:
- name: check if tripleo_frr systemd service is active
become: true
shell: systemctl is-active --quiet tripleo_frr
failed_when: false
register: frr_active_service
- name: restart frr container
become: true
systemd:
name: tripleo_frr
state: restarted
when:
- frr_active_service.rc == 0