You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB

9 years ago
  1. ---
  2. - name: Flannel | delete default docker bridge
  3. command: ip link delete docker0
  4. failed_when: false
  5. notify: Flannel | restart docker
  6. - name: Flannel | restart docker
  7. command: /bin/true
  8. notify:
  9. - Flannel | reload systemd
  10. - Flannel | reload docker.socket
  11. - Flannel | reload docker
  12. - Flannel | pause while Docker restarts
  13. - Flannel | wait for docker
  14. - name : Flannel | reload systemd
  15. shell: systemctl daemon-reload
  16. - name: Flannel | reload docker.socket
  17. service:
  18. name: docker.socket
  19. state: restarted
  20. when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS']
  21. - name: Flannel | reload docker
  22. service:
  23. name: docker
  24. state: restarted
  25. - name: Flannel | pause while Docker restarts
  26. pause:
  27. seconds: 10
  28. prompt: "Waiting for docker restart"
  29. - name: Flannel | wait for docker
  30. command: "{{ docker_bin_dir }}/docker images"
  31. register: docker_ready
  32. retries: 10
  33. delay: 5
  34. until: docker_ready.rc == 0
  35. - name: Flannel | reload kubelet
  36. service:
  37. name: kubelet
  38. state: restarted