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.

64 lines
1.7 KiB

  1. ---
  2. - name: Set docker daemon options
  3. template:
  4. src: docker
  5. dest: "/etc/default/docker"
  6. owner: root
  7. group: root
  8. mode: 0644
  9. notify:
  10. - restart docker
  11. - name: Write docker.service systemd file
  12. template:
  13. src: systemd-docker.service
  14. dest: /lib/systemd/system/docker.service
  15. notify: restart docker
  16. when: init_system == "systemd"
  17. - meta: flush_handlers
  18. - name: Weave | Install weave
  19. command: rsync -piu "{{ local_release_dir }}/weave/bin/weave" "{{ bin_dir }}/weave"
  20. changed_when: false
  21. - name: Weave | pull weave images
  22. shell: "{{ bin_dir }}/weave setup"
  23. changed_when: false
  24. - name: Weave | set perms
  25. file: path="{{ bin_dir }}/weave" mode=0755 state=file
  26. - name: Weave | Set options
  27. template:
  28. src: weave.j2
  29. dest: "/etc/weave.env"
  30. owner: root
  31. group: root
  32. mode: 0644
  33. notify:
  34. - restart systemd-weave
  35. - name: Weave | Write weave systemd init file
  36. template: src=weave.service.j2 dest=/etc/systemd/system/weave.service
  37. when: init_system == "systemd"
  38. notify: restart systemd-weave
  39. - name: Weave | Write weaveproxy systemd init file
  40. template: src=weaveproxy.service.j2 dest=/etc/systemd/system/weaveproxy.service
  41. when: init_system == "systemd"
  42. notify: restart systemd-weaveproxy
  43. - name: Weave | Write weaveexpose systemd init file
  44. template: src=weaveexpose.service.j2 dest=/etc/systemd/system/weaveexpose.service
  45. when: init_system == "systemd"
  46. notify: restart systemd-weaveexpose
  47. - name: Weave | Enable weave
  48. service: name=weave enabled=yes state=started
  49. - name: Weave | Enable weaveproxy
  50. service: name=weaveproxy enabled=yes state=started
  51. - name: Weave | Enable weaveexpose
  52. service: name=weaveexpose enabled=yes state=started