stop_services.yml 655 B

12345678910111213141516171819202122232425262728
  1. ---
  2. - name: Stop node and openvswitch services
  3. service:
  4. name: "{{ item }}"
  5. state: stopped
  6. with_items:
  7. - openvswitch
  8. - "{{ openshift_service_type }}-node"
  9. failed_when: false
  10. - name: Ensure static containerized services stopped before Docker restart
  11. command: /usr/local/bin/master-restart "{{ item }}"
  12. with_items:
  13. - api
  14. - controllers
  15. - etcd
  16. failed_when: false
  17. - service:
  18. name: docker
  19. state: stopped
  20. register: l_openshift_node_upgrade_docker_stop_result
  21. until: not (l_openshift_node_upgrade_docker_stop_result is failed)
  22. retries: 3
  23. delay: 30
  24. when:
  25. - l_docker_upgrade is defined
  26. - l_docker_upgrade | bool