restart.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. - name: Create initial host groups for localhost
  3. hosts: localhost
  4. connection: local
  5. become: no
  6. gather_facts: no
  7. tags:
  8. - always
  9. tasks:
  10. - include_vars: ../../byo/openshift-cluster/cluster_hosts.yml
  11. - name: Evaluate group l_oo_all_hosts
  12. add_host:
  13. name: "{{ item }}"
  14. groups: l_oo_all_hosts
  15. with_items: "{{ g_all_hosts | default([]) }}"
  16. changed_when: False
  17. - name: Create initial host groups for all hosts
  18. hosts: l_oo_all_hosts
  19. gather_facts: no
  20. tags:
  21. - always
  22. tasks:
  23. - include_vars: ../../byo/openshift-cluster/cluster_hosts.yml
  24. - include: ../../common/openshift-cluster/evaluate_groups.yml
  25. - include: ../../common/openshift-master/validate_restart.yml
  26. - name: Restart masters
  27. hosts: oo_masters_to_config
  28. vars:
  29. openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
  30. serial: 1
  31. tasks:
  32. - include: restart_hosts.yml
  33. when: openshift.common.rolling_restart_mode == 'system'
  34. - include: restart_services.yml
  35. when: openshift.common.rolling_restart_mode == 'services'