c12s-kubespray/roles/kubernetes-apps/efk/fluentd/tasks/main.yml

23 lines
708 B
YAML
Raw Normal View History

2017-01-26 23:33:01 +00:00
---
- name: "Fluentd | copy config file"
template:
src: fluentd-config.yml.j2
dest: "{{ kube_config_dir }}/fluentd-config.yaml"
register: fluentd_config
- name: "Fluentd | create configMap"
command: "{{bin_dir}}/kubectl apply -f {{ kube_config_dir }}/fluentd-config.yaml"
run_once: true
when: fluentd_config.changed
2017-01-26 23:33:01 +00:00
- name: "Fluentd | Write fluentd daemonset"
template:
2017-01-26 23:33:01 +00:00
src: fluentd-ds.yml.j2
dest: "{{ kube_config_dir }}/fluentd-ds.yaml"
register: fluentd_ds_manifest
- name: "Fluentd | Create fluentd daemonset"
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/fluentd-ds.yaml -n {{ system_namespace }}"
2017-01-26 23:33:01 +00:00
run_once: true
when: fluentd_ds_manifest.changed