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.

30 lines
1.0 KiB

  1. ---
  2. - name: Create docker service systemd directory if it doesn't exist
  3. file: path=/etc/systemd/system/docker.service.d state=directory
  4. - name: Write docker proxy drop-in
  5. template:
  6. src: http-proxy.conf.j2
  7. dest: /etc/systemd/system/docker.service.d/http-proxy.conf
  8. when: http_proxy is defined or https_proxy is defined or no_proxy is defined
  9. - name: Write docker.service systemd file
  10. template:
  11. src: docker.service.j2
  12. dest: /etc/systemd/system/docker.service
  13. register: docker_service_file
  14. when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
  15. - name: Write docker options systemd drop-in
  16. template:
  17. src: docker-options.conf.j2
  18. dest: "/etc/systemd/system/docker.service.d/docker-options.conf"
  19. notify: restart docker
  20. - name: Write docker dns systemd drop-in
  21. template:
  22. src: docker-dns.conf.j2
  23. dest: "/etc/systemd/system/docker.service.d/docker-dns.conf"
  24. notify: restart docker
  25. when: dns_mode != 'none' and resolvconf_mode == 'docker_dns'
  26. - meta: flush_handlers