2017-01-26 23:33:01 +00:00
|
|
|
---
|
2017-08-10 06:48:53 +00:00
|
|
|
- name: "ElasticSearch | Write efk manifests (RBAC)"
|
|
|
|
template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "{{ kube_config_dir }}/{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- "efk-sa.yml"
|
|
|
|
- "efk-clusterrolebinding.yml"
|
|
|
|
run_once: true
|
|
|
|
when: rbac_enabled
|
|
|
|
|
|
|
|
- name: "ElasticSearch | Create Serviceaccount and Clusterrolebinding (RBAC)"
|
2017-09-05 05:35:14 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/{{ item }} -n {{ system_namespace }}"
|
2017-08-10 06:48:53 +00:00
|
|
|
with_items:
|
|
|
|
- "efk-sa.yml"
|
|
|
|
- "efk-clusterrolebinding.yml"
|
|
|
|
run_once: true
|
|
|
|
when: rbac_enabled
|
|
|
|
|
2017-01-26 23:33:01 +00:00
|
|
|
- name: "ElasticSearch | Write ES deployment"
|
2017-08-10 06:48:53 +00:00
|
|
|
template:
|
2017-01-26 23:33:01 +00:00
|
|
|
src: elasticsearch-deployment.yml.j2
|
|
|
|
dest: "{{ kube_config_dir }}/elasticsearch-deployment.yaml"
|
|
|
|
register: es_deployment_manifest
|
|
|
|
|
|
|
|
- name: "ElasticSearch | Create ES deployment"
|
2017-08-10 06:48:53 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/elasticsearch-deployment.yaml -n {{ system_namespace }}"
|
2017-01-26 23:33:01 +00:00
|
|
|
run_once: true
|
2017-08-10 06:48:53 +00:00
|
|
|
when: es_deployment_manifest.changed
|
2017-01-26 23:33:01 +00:00
|
|
|
|
|
|
|
- name: "ElasticSearch | Write ES service "
|
2017-08-10 06:48:53 +00:00
|
|
|
template:
|
2017-01-26 23:33:01 +00:00
|
|
|
src: elasticsearch-service.yml.j2
|
|
|
|
dest: "{{ kube_config_dir }}/elasticsearch-service.yaml"
|
|
|
|
register: es_service_manifest
|
|
|
|
|
|
|
|
- name: "ElasticSearch | Create ES service"
|
2017-08-10 06:48:53 +00:00
|
|
|
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/elasticsearch-service.yaml -n {{ system_namespace }}"
|
2017-01-26 23:33:01 +00:00
|
|
|
run_once: true
|
2017-08-10 06:48:53 +00:00
|
|
|
when: es_service_manifest.changed
|