You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. ---
  2. - name: "ElasticSearch | Write efk manifests (RBAC)"
  3. template:
  4. src: "{{ item }}"
  5. dest: "{{ kube_config_dir }}/{{ item }}"
  6. with_items:
  7. - "efk-sa.yml"
  8. - "efk-clusterrolebinding.yml"
  9. run_once: true
  10. when: rbac_enabled
  11. - name: "ElasticSearch | Create Serviceaccount and Clusterrolebinding (RBAC)"
  12. command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/{{ item }} -n {{ system_namespace }}"
  13. with_items:
  14. - "efk-sa.yml"
  15. - "efk-clusterrolebinding.yml"
  16. run_once: true
  17. when: rbac_enabled
  18. - name: "ElasticSearch | Write ES deployment"
  19. template:
  20. src: elasticsearch-deployment.yml.j2
  21. dest: "{{ kube_config_dir }}/elasticsearch-deployment.yaml"
  22. register: es_deployment_manifest
  23. - name: "ElasticSearch | Create ES deployment"
  24. command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/elasticsearch-deployment.yaml -n {{ system_namespace }}"
  25. run_once: true
  26. when: es_deployment_manifest.changed
  27. - name: "ElasticSearch | Write ES service "
  28. template:
  29. src: elasticsearch-service.yml.j2
  30. dest: "{{ kube_config_dir }}/elasticsearch-service.yaml"
  31. register: es_service_manifest
  32. - name: "ElasticSearch | Create ES service"
  33. command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/elasticsearch-service.yaml -n {{ system_namespace }}"
  34. run_once: true
  35. when: es_service_manifest.changed