c12s-kubespray/roles/kubernetes-apps/efk/elasticsearch/tasks/main.yml
2017-04-10 11:01:12 -05:00

34 lines
1.1 KiB
YAML

---
- name: "ElasticSearch | Write ES deployment"
template:
src: elasticsearch-deployment.yml.j2
dest: "{{ kube_config_dir }}/elasticsearch-deployment.yaml"
register: es_deployment_manifest
- name: "ElasticSearch | Create ES deployment"
kube:
filename: "{{kube_config_dir}}/elasticsearch-deployment.yaml"
kubectl: "{{bin_dir}}/kubectl"
name: "elasticsearch-logging-v1"
namespace: "{{system_namespace}}"
resource: "rc"
state: "{{ item | ternary('latest','present') }}"
with_items: "{{ es_deployment_manifest.changed }}"
run_once: true
- name: "ElasticSearch | Write ES service "
template:
src: elasticsearch-service.yml.j2
dest: "{{ kube_config_dir }}/elasticsearch-service.yaml"
register: es_service_manifest
- name: "ElasticSearch | Create ES service"
kube:
filename: "{{kube_config_dir}}/elasticsearch-service.yaml"
kubectl: "{{bin_dir}}/kubectl"
name: "elasticsearch-logging"
namespace: "{{system_namespace}}"
resource: "svc"
state: "{{ item | ternary('latest','present') }}"
with_items: "{{ es_service_manifest.changed }}"
run_once: true