Skip to content

Instantly share code, notes, and snippets.

@n10o
Created August 15, 2014 06:53
Show Gist options
  • Save n10o/745c33e8d2fd0f3bf209 to your computer and use it in GitHub Desktop.
Save n10o/745c33e8d2fd0f3bf209 to your computer and use it in GitHub Desktop.
td-agent(fluentd) setting for ansible
---
- name: add td-agent repository
copy: src=td.repo dest=/etc/yum.repos.d/td.repo
- name: install td-agent
yum: name=td-agent state=present
- name: install fluent plugins use fluent-gem
gem: name=fluent-plugin-{{ item }} state=present executable=/usr/lib64/fluent/ruby/bin/fluent-gem
with_items:
- record-reformer
- rewrite-tag-filter
- forest
- tail-multiline
- elasticsearch
- name: configure td-agent
copy: src=td-agent.conf dest=/etc/td-agent/td-agent.conf
notify: restart td-agent
- name: ensure td-agent is running
action: service name=td-agent state=started enabled=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment