From 96b9c0de9637d0fe8f7204c91766c4024e7762cb Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 7 Jan 2019 14:39:51 -0500 Subject: [PATCH] Allow user to optionally manage config files As an example, if we are only install zuul-web, a user might not want logging files from other services. However, installing them won't hury anything, so do that by default. Change-Id: I3c43259a1a6f1bfc35911fa6e1c9d4f506c05f40 Signed-off-by: Paul Belanger --- defaults/main.yaml | 7 +++++++ tasks/config.yaml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/defaults/main.yaml b/defaults/main.yaml index 1da1e2c..fd18c11 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -27,12 +27,14 @@ zuul_user_home: /var/lib/zuul zuul_file_main_yaml_dest: /etc/zuul/main.yaml zuul_file_main_yaml_group: "{{ zuul_user_group }}" +zuul_file_main_yaml_manage: true zuul_file_main_yaml_mode: 0644 zuul_file_main_yaml_owner: "{{ zuul_user_name }}" zuul_file_main_yaml_src: etc/zuul/main.yaml zuul_file_gearman_logging_conf_dest: /etc/zuul/gearman-logging.conf zuul_file_gearman_logging_conf_group: "{{ zuul_user_group }}" +zuul_file_gearman_logging_conf_manage: true zuul_file_gearman_logging_conf_mode: 0644 zuul_file_gearman_logging_conf_owner: "{{ zuul_user_name }}" zuul_file_gearman_logging_conf_src: etc/zuul/gearman-logging.conf @@ -60,30 +62,35 @@ zuul_file_gearman_ssl_key_src: etc/zuul/ssl/client.key zuul_file_executor_logging_conf_dest: /etc/zuul/executor-logging.conf zuul_file_executor_logging_conf_group: "{{ zuul_user_group }}" +zuul_file_executor_logging_conf_manage: true zuul_file_executor_logging_conf_mode: 0644 zuul_file_executor_logging_conf_owner: "{{ zuul_user_name }}" zuul_file_executor_logging_conf_src: etc/zuul/executor-logging.conf zuul_file_fingergw_logging_conf_dest: /etc/zuul/fingergw-logging.conf zuul_file_fingergw_logging_conf_group: "{{ zuul_user_group }}" +zuul_file_fingergw_logging_conf_manage: true zuul_file_fingergw_logging_conf_mode: 0644 zuul_file_fingergw_logging_conf_owner: "{{ zuul_user_name }}" zuul_file_fingergw_logging_conf_src: etc/zuul/fingergw-logging.conf zuul_file_merger_logging_conf_dest: /etc/zuul/merger-logging.conf zuul_file_merger_logging_conf_group: "{{ zuul_user_group }}" +zuul_file_merger_logging_conf_manage: true zuul_file_merger_logging_conf_mode: 0644 zuul_file_merger_logging_conf_owner: "{{ zuul_user_name }}" zuul_file_merger_logging_conf_src: etc/zuul/merger-logging.conf zuul_file_scheduler_logging_conf_dest: /etc/zuul/scheduler-logging.conf zuul_file_scheduler_logging_conf_group: "{{ zuul_user_group }}" +zuul_file_scheduler_logging_conf_manage: true zuul_file_scheduler_logging_conf_mode: 0644 zuul_file_scheduler_logging_conf_owner: "{{ zuul_user_name }}" zuul_file_scheduler_logging_conf_src: etc/zuul/scheduler-logging.conf zuul_file_web_logging_conf_dest: /etc/zuul/web-logging.conf zuul_file_web_logging_conf_group: "{{ zuul_user_group }}" +zuul_file_web_logging_conf_manage: true zuul_file_web_logging_conf_mode: 0644 zuul_file_web_logging_conf_owner: "{{ zuul_user_name }}" zuul_file_web_logging_conf_src: etc/zuul/web-logging.conf diff --git a/tasks/config.yaml b/tasks/config.yaml index db9b0c8..f7e4639 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -34,6 +34,7 @@ src: "{{ zuul_file_gearman_logging_conf_src }}" register: zuul_file_gearman_logging_conf notify: Reload zuul-scheduler + when: zuul_file_gearman_logging_conf_manage - name: Install executor logging file become: true @@ -44,6 +45,7 @@ owner: "{{ zuul_file_executor_logging_conf_owner }}" src: "{{ zuul_file_executor_logging_conf_src }}" register: zuul_file_executor_logging_conf + when: zuul_file_executor_logging_conf_manage - name: Install fingergw logging file become: true @@ -54,6 +56,7 @@ owner: "{{ zuul_file_fingergw_logging_conf_owner }}" src: "{{ zuul_file_fingergw_logging_conf_src }}" register: zuul_file_fingergw_logging_conf + when: zuul_file_fingergw_logging_conf_manage - name: Install merger logging file become: true @@ -64,6 +67,7 @@ owner: "{{ zuul_file_merger_logging_conf_owner }}" src: "{{ zuul_file_merger_logging_conf_src }}" register: zuul_file_merger_logging_conf + when: zuul_file_merger_logging_conf_manage - name: Install scheduler logging file become: true @@ -75,6 +79,7 @@ src: "{{ zuul_file_scheduler_logging_conf_src }}" register: zuul_file_scheduler_logging_conf notify: Reload zuul-scheduler + when: zuul_file_scheduler_logging_conf_manage - name: Install zuul gearman ssl ca configuration become: true @@ -115,6 +120,7 @@ owner: "{{ zuul_file_web_logging_conf_owner }}" src: "{{ zuul_file_web_logging_conf_src }}" register: zuul_file_web_logging_conf + when: zuul_file_web_logging_conf_manage - name: Install zuul main.yaml configuration become: true @@ -127,6 +133,7 @@ register: zuul_file_main_yaml notify: - Reload zuul-scheduler + when: zuul_file_main_yaml_manage - name: Install zuul configuration become: true