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.

35 lines
813 B

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