
This migrates installation of config files from using 'copy' to 'template', allowing downstream users of the role the ability to carry a template in their playbooks and have it easily rendered out simply by overriding the zuul_file_*_dest variables. Note, this omits layout.yaml for the time being Depends-on: I32cc11901bddd03125e1c4ce6f246d811f414cba Change-Id: I9f5890a54ded2b0169aa76501828e7856e0d6583
94 lines
3.1 KiB
YAML
94 lines
3.1 KiB
YAML
# Copyright 2015 Red Hat, Inc.
|
|
#
|
|
# 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 required directories.
|
|
become: yes
|
|
file:
|
|
group: "{{ zuul_user_group }}"
|
|
owner: "{{ zuul_user_name }}"
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- /etc/zuul
|
|
- /var/log/zuul
|
|
|
|
- name: Install gearman logging file.
|
|
become: yes
|
|
template:
|
|
dest: "{{ zuul_file_gearman_logging_conf_dest }}"
|
|
group: "{{ zuul_file_gearman_logging_conf_group }}"
|
|
mode: "{{ zuul_file_gearman_logging_conf_mode }}"
|
|
owner: "{{ zuul_file_gearman_logging_conf_owner }}"
|
|
src: "{{ zuul_file_gearman_logging_conf_src }}"
|
|
register: zuul_file_gearman_logging_conf
|
|
notify: Reload zuul-server
|
|
|
|
- name: Install launcher logging file.
|
|
become: yes
|
|
template:
|
|
dest: "{{ zuul_file_launcher_logging_conf_dest }}"
|
|
group: "{{ zuul_file_launcher_logging_conf_group }}"
|
|
mode: "{{ zuul_file_launcher_logging_conf_mode }}"
|
|
owner: "{{ zuul_file_launcher_logging_conf_owner }}"
|
|
src: "{{ zuul_file_launcher_logging_conf_src }}"
|
|
register: zuul_file_launcher_logging_conf
|
|
notify: Reload zuul-launcher
|
|
|
|
- name: Install merger logging file.
|
|
become: yes
|
|
template:
|
|
dest: "{{ zuul_file_merger_logging_conf_dest }}"
|
|
group: "{{ zuul_file_merger_logging_conf_group }}"
|
|
mode: "{{ zuul_file_merger_logging_conf_mode }}"
|
|
owner: "{{ zuul_file_merger_logging_conf_owner }}"
|
|
src: "{{ zuul_file_merger_logging_conf_src }}"
|
|
register: zuul_file_merger_logging_conf
|
|
notify: Reload zuul-merger
|
|
|
|
- name: Install server logging file.
|
|
become: yes
|
|
template:
|
|
dest: "{{ zuul_file_server_logging_conf_dest }}"
|
|
group: "{{ zuul_file_server_logging_conf_group }}"
|
|
mode: "{{ zuul_file_server_logging_conf_mode }}"
|
|
owner: "{{ zuul_file_server_logging_conf_owner }}"
|
|
src: "{{ zuul_file_server_logging_conf_src }}"
|
|
register: zuul_file_server_logging_conf
|
|
notify: Reload zuul-server
|
|
|
|
- name: Install layout configuration.
|
|
become: yes
|
|
copy:
|
|
dest: "{{ zuul_file_layout_dest }}"
|
|
group: "{{ zuul_file_layout_group }}"
|
|
mode: "{{ zuul_file_layout_mode }}"
|
|
owner: "{{ zuul_file_layout_owner }}"
|
|
src: "{{ zuul_file_layout_src }}"
|
|
register: zuul_file_layout
|
|
notify: Reload zuul-server
|
|
|
|
- name: Install zuul configuration.
|
|
become: yes
|
|
template:
|
|
dest: "{{ zuul_file_zuul_conf_dest }}"
|
|
group: "{{ zuul_file_zuul_conf_group }}"
|
|
mode: "{{ zuul_file_zuul_conf_mode }}"
|
|
owner: "{{ zuul_file_zuul_conf_owner }}"
|
|
src: "{{ zuul_file_zuul_conf_src }}"
|
|
register: zuul_file_zuul_conf
|
|
notify:
|
|
- Reload zuul-launcher
|
|
- Reload zuul-merger
|
|
- Reload zuul-server
|