start_cluster.yaml 3.1 KB

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