start_cluster.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ---
  2. - command: >
  3. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get node -o jsonpath='{.items[*].metadata.name}'
  4. register: fluentd_hosts
  5. when: "'--all' in openshift_logging_fluentd_hosts"
  6. check_mode: no
  7. changed_when: no
  8. - name: start fluentd
  9. include: label_node.yaml
  10. vars:
  11. host: "{{fluentd_host}}"
  12. label: "{{openshift_logging_fluentd_nodeselector.keys()[0]}}"
  13. value: "{{openshift_logging_fluentd_nodeselector.values()[0]}}"
  14. with_items: "{{(fluentd_hosts.stdout_lines is defined) | ternary(fluentd_hosts.stdout_lines, openshift_logging_fluentd_hosts)}}"
  15. loop_control:
  16. loop_var: fluentd_host
  17. - command: >
  18. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=es -o name -n {{openshift_logging_namespace}}
  19. register: es_dc
  20. check_mode: no
  21. changed_when: no
  22. - name: start elasticsearch
  23. include: scale.yaml
  24. vars:
  25. desired: 1
  26. with_items: "{{es_dc.stdout_lines}}"
  27. loop_control:
  28. loop_var: object
  29. - command: >
  30. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=kibana -o name -n {{openshift_logging_namespace}}
  31. register: kibana_dc
  32. check_mode: no
  33. changed_when: no
  34. - name: start kibana
  35. include: scale.yaml
  36. vars:
  37. desired: "{{ openshift_logging_kibana_replica_count | default (1) }}"
  38. with_items: "{{kibana_dc.stdout_lines}}"
  39. loop_control:
  40. loop_var: object
  41. - command: >
  42. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=curator -o name -n {{openshift_logging_namespace}}
  43. register: curator_dc
  44. check_mode: no
  45. changed_when: no
  46. - name: start curator
  47. include: scale.yaml
  48. vars:
  49. desired: 1
  50. with_items: "{{curator_dc.stdout_lines}}"
  51. loop_control:
  52. loop_var: object
  53. - command: >
  54. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=es-ops -o name -n {{openshift_logging_namespace}}
  55. register: es_dc
  56. check_mode: no
  57. changed_when: no
  58. - name: start elasticsearch-ops
  59. include: scale.yaml
  60. vars:
  61. desired: 1
  62. with_items: "{{es_dc.stdout_lines}}"
  63. loop_control:
  64. loop_var: object
  65. when: openshift_logging_use_ops
  66. - command: >
  67. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=kibana-ops -o name -n {{openshift_logging_namespace}}
  68. register: kibana_dc
  69. check_mode: no
  70. changed_when: no
  71. - name: start kibana-ops
  72. include: scale.yaml
  73. vars:
  74. desired: "{{ openshift_logging_kibana_ops_replica_count | default (1) }}"
  75. with_items: "{{kibana_dc.stdout_lines}}"
  76. loop_control:
  77. loop_var: object
  78. when: openshift_logging_use_ops
  79. - command: >
  80. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=curator-ops -o name -n {{openshift_logging_namespace}}
  81. register: curator_dc
  82. check_mode: no
  83. changed_when: no
  84. - name: start curator-ops
  85. include: scale.yaml
  86. vars:
  87. desired: 1
  88. with_items: "{{curator_dc.stdout_lines}}"
  89. loop_control:
  90. loop_var: object
  91. when: openshift_logging_use_ops