From 747f3ba540d68bc8cbfd260d0b4ccb06d2322d51 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Fri, 14 Oct 2016 13:59:37 -0700 Subject: [PATCH] Migrate config installation from copy -> template 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 --- tasks/config.yaml | 22 +++++++++---------- .../etc/zuul/gearman-logging.conf | 0 .../etc/zuul/launcher-logging.conf | 0 .../etc/zuul/merger-logging.conf | 0 .../etc/zuul/server-logging.conf | 0 {files => templates}/etc/zuul/zuul.conf | 0 6 files changed, 11 insertions(+), 11 deletions(-) rename {files => templates}/etc/zuul/gearman-logging.conf (100%) rename {files => templates}/etc/zuul/launcher-logging.conf (100%) rename {files => templates}/etc/zuul/merger-logging.conf (100%) rename {files => templates}/etc/zuul/server-logging.conf (100%) rename {files => templates}/etc/zuul/zuul.conf (100%) diff --git a/tasks/config.yaml b/tasks/config.yaml index ba43a98..6b5478c 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -23,9 +23,9 @@ - /etc/zuul - /var/log/zuul -- name: Copy gearman logging file. +- name: Install gearman logging file. become: yes - copy: + template: dest: "{{ zuul_file_gearman_logging_conf_dest }}" group: "{{ zuul_file_gearman_logging_conf_group }}" mode: "{{ zuul_file_gearman_logging_conf_mode }}" @@ -34,9 +34,9 @@ register: zuul_file_gearman_logging_conf notify: Reload zuul-server -- name: Copy launcher logging file. +- name: Install launcher logging file. become: yes - copy: + template: dest: "{{ zuul_file_launcher_logging_conf_dest }}" group: "{{ zuul_file_launcher_logging_conf_group }}" mode: "{{ zuul_file_launcher_logging_conf_mode }}" @@ -45,9 +45,9 @@ register: zuul_file_launcher_logging_conf notify: Reload zuul-launcher -- name: Copy merger logging file. +- name: Install merger logging file. become: yes - copy: + template: dest: "{{ zuul_file_merger_logging_conf_dest }}" group: "{{ zuul_file_merger_logging_conf_group }}" mode: "{{ zuul_file_merger_logging_conf_mode }}" @@ -56,9 +56,9 @@ register: zuul_file_merger_logging_conf notify: Reload zuul-merger -- name: Copy server logging file. +- name: Install server logging file. become: yes - copy: + template: dest: "{{ zuul_file_server_logging_conf_dest }}" group: "{{ zuul_file_server_logging_conf_group }}" mode: "{{ zuul_file_server_logging_conf_mode }}" @@ -67,7 +67,7 @@ register: zuul_file_server_logging_conf notify: Reload zuul-server -- name: Copy layout configuration. +- name: Install layout configuration. become: yes copy: dest: "{{ zuul_file_layout_dest }}" @@ -78,9 +78,9 @@ register: zuul_file_layout notify: Reload zuul-server -- name: Copy zuul configuration. +- name: Install zuul configuration. become: yes - copy: + template: dest: "{{ zuul_file_zuul_conf_dest }}" group: "{{ zuul_file_zuul_conf_group }}" mode: "{{ zuul_file_zuul_conf_mode }}" diff --git a/files/etc/zuul/gearman-logging.conf b/templates/etc/zuul/gearman-logging.conf similarity index 100% rename from files/etc/zuul/gearman-logging.conf rename to templates/etc/zuul/gearman-logging.conf diff --git a/files/etc/zuul/launcher-logging.conf b/templates/etc/zuul/launcher-logging.conf similarity index 100% rename from files/etc/zuul/launcher-logging.conf rename to templates/etc/zuul/launcher-logging.conf diff --git a/files/etc/zuul/merger-logging.conf b/templates/etc/zuul/merger-logging.conf similarity index 100% rename from files/etc/zuul/merger-logging.conf rename to templates/etc/zuul/merger-logging.conf diff --git a/files/etc/zuul/server-logging.conf b/templates/etc/zuul/server-logging.conf similarity index 100% rename from files/etc/zuul/server-logging.conf rename to templates/etc/zuul/server-logging.conf diff --git a/files/etc/zuul/zuul.conf b/templates/etc/zuul/zuul.conf similarity index 100% rename from files/etc/zuul/zuul.conf rename to templates/etc/zuul/zuul.conf