aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-08-15 15:55:40 +0000
committerGerrit Code Review <review@openstack.org>2016-08-15 15:55:40 +0000
commitf63568ed3c672903c23ad873edf9c042b1cc9572 (patch)
treece26a18be5caa2c2c675387206da566ca42c8d4a
parent06c09562d95e8089f1ac74dfc3e65db213cca9cc (diff)
parent173d2540865987733f4346440f6c5f9d3bc4ae40 (diff)
downloadkolla-f63568ed3c672903c23ad873edf9c042b1cc9572.tar.gz
kolla-f63568ed3c672903c23ad873edf9c042b1cc9572.zip
Merge "Add heka custom config to define user's log pipline"
-rw-r--r--ansible/roles/common/tasks/config.yml10
-rw-r--r--ansible/roles/common/templates/heka.json.j27
2 files changed, 17 insertions, 0 deletions
diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml
index 27a98576c..d3d0c3a71 100644
--- a/ansible/roles/common/tasks/config.yml
+++ b/ansible/roles/common/tasks/config.yml
@@ -48,6 +48,16 @@
- { name: "swift-proxy-server", src: "swift", enabled: "{{ enable_swift }}" }
- { name: "swift-rsyncd", src: "swift", enabled: "{{ enable_swift }}" }
+- name: Heka custom config file exists
+ stat: "path={{ node_custom_config }}/heka/heka-custom.toml"
+ register: heka_custom_stat_result
+
+- name: Copying over heka custom config file
+ template:
+ src: "{{ node_custom_config }}/heka/heka-custom.toml"
+ dest: "{{ node_config_directory }}/heka/heka-custom.toml"
+ when: heka_custom_stat_result.stat.exists == true
+
- name: Copying over cron logrotate config files
template:
src: "cron-logrotate-{{ item }}.conf.j2"
diff --git a/ansible/roles/common/templates/heka.json.j2 b/ansible/roles/common/templates/heka.json.j2
index 5b2de756a..11a73c55e 100644
--- a/ansible/roles/common/templates/heka.json.j2
+++ b/ansible/roles/common/templates/heka.json.j2
@@ -16,6 +16,13 @@
"perm": "0600"
},
{
+ "source": "{{ container_config_directory }}/heka-custom.toml",
+ "dest": "/etc/heka/heka-custom.toml",
+ "owner": "heka",
+ "perm": "0600",
+ "optional": true
+ },
+ {
"source": "{{ container_config_directory }}/heka-haproxy.toml",
"dest": "/etc/heka/heka-haproxy.toml",
"owner": "heka",