restart.yml 839 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. - hosts: localhost
  3. connection: local
  4. become: no
  5. gather_facts: no
  6. tasks:
  7. - include_vars: ../../byo/openshift-cluster/cluster_hosts.yml
  8. - add_host:
  9. name: "{{ item }}"
  10. groups: l_oo_all_hosts
  11. with_items: "{{ g_all_hosts }}"
  12. - hosts: l_oo_all_hosts
  13. gather_facts: no
  14. tasks:
  15. - include_vars: ../../byo/openshift-cluster/cluster_hosts.yml
  16. - include: ../../common/openshift-cluster/evaluate_groups.yml
  17. - include: ../../common/openshift-master/validate_restart.yml
  18. - name: Restart masters
  19. hosts: oo_masters_to_config
  20. vars:
  21. openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}"
  22. serial: 1
  23. tasks:
  24. - include: restart_hosts.yml
  25. when: openshift.common.rolling_restart_mode == 'system'
  26. - include: restart_services.yml
  27. when: openshift.common.rolling_restart_mode == 'services'