stop_services.yml 997 B

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