diff options
author | Jhon Honce <jhonce@redhat.com> | 2015-05-29 14:35:48 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2015-05-29 14:36:56 -0700 |
commit | 9873607d36f974114da1177451761ee053e38d71 (patch) | |
tree | 3561fdf0dabfc9a03063a3f38b862c71f47d4e2c /roles/fluentd_node/tasks | |
parent | 3e533e199aa9262f5ca45f8311e82e975cde73b9 (diff) | |
download | openshift-9873607d36f974114da1177451761ee053e38d71.tar.gz openshift-9873607d36f974114da1177451761ee053e38d71.tar.bz2 openshift-9873607d36f974114da1177451761ee053e38d71.tar.xz openshift-9873607d36f974114da1177451761ee053e38d71.zip |
Install fluentd on nodes and master
* Configure fluentd to aggragate container logs
Diffstat (limited to 'roles/fluentd_node/tasks')
-rw-r--r-- | roles/fluentd_node/tasks/main.yml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/roles/fluentd_node/tasks/main.yml b/roles/fluentd_node/tasks/main.yml new file mode 100644 index 000000000..951c5a229 --- /dev/null +++ b/roles/fluentd_node/tasks/main.yml @@ -0,0 +1,48 @@ +--- +# TODO: Update fluentd install and configuration when packaging is complete +- name: download and install td-agent + yum: + name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' + state: present + +- name: install Kubernetes fluentd plugin + command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes' + +- name: Override td-agent configuration file + template: + src: td-agent.j2 + dest: /etc/sysconfig/td-agent + group: 'td-agent' + owner: 'td-agent' + mode: 0444 + +- name: Creates directories + file: + path: "{{ item }}" + state: directory + group: 'td-agent' + owner: 'td-agent' + mode: 0755 + with_items: ['/etc/td-agent/config.d', '/var/log/td-agent/tmp'] + +- name: Add include to td-agent configuration + lineinfile: + dest: '/etc/td-agent/td-agent.conf' + regexp: '^@include config.d' + line: '@include config.d/*.conf' + state: present + +- name: install Kubernetes fluentd configuration file + template: + src: kubernetes.conf.j2 + dest: /etc/td-agent/config.d/kubernetes.conf + group: 'td-agent' + owner: 'td-agent' + mode: 0444 + +- name: ensure td-agent is running + service: + name: 'td-agent' + state: started + enabled: yes + |