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.

33 lines
803 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: seconds=10 prompt="Waiting for docker restart"
  23. - name: Docker | wait for docker
  24. command: "{{ docker_bin_dir }}/docker images"
  25. register: docker_ready
  26. retries: 10
  27. delay: 5
  28. until: docker_ready.rc == 0