upgrade_logging.yaml 1001 B

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. - name: Stop the Cluster
  3. include: stop_cluster.yaml
  4. - name: Upgrade logging
  5. include: install_logging.yaml
  6. vars:
  7. start_cluster: False
  8. # ensure that ES is running
  9. - shell: >
  10. {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get dc -l component=es -o name -n {{openshift_logging_namespace}}
  11. register: es_dc
  12. check_mode: no
  13. - name: start elasticsearch
  14. include: scale.yaml
  15. vars:
  16. desired: 1
  17. with_items: "{{es_dc.stdout_lines}}"
  18. loop_control:
  19. loop_var: object
  20. - copy:
  21. src: es_migration.sh
  22. dest: {{mktemp.stdout}}/es_migration.sh
  23. - name: Run upgrade scripts
  24. shell: >
  25. sh {{mktemp.stdout}}/es_migration.sh {{openshift.common.config_base}}/logging/ca.crt {{openshift.common.config_base}}/logging/system.admin.key {{openshift.common.config_base}}/logging/system.admin.crt {{openshift_logging_es_host}} {{openshift_logging_es_port}} {{openshift_logging_namespace}}
  26. - name: Start up rest of cluster
  27. include: start_cluster.yaml