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.

57 lines
1.5 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: Weave | Install weave
  12. command: rsync -piu "{{ local_release_dir }}/weave/bin/weave" "{{ bin_dir }}/weave"
  13. changed_when: false
  14. - name: Weave | pull weave images
  15. shell: "{{ bin_dir }}/weave setup"
  16. changed_when: false
  17. - name: Weave | set perms
  18. file: path="{{ bin_dir }}/weave" mode=0755 state=file
  19. - name: Weave | Set options
  20. template:
  21. src: weave.j2
  22. dest: "/etc/weave.env"
  23. owner: root
  24. group: root
  25. mode: 0644
  26. notify:
  27. - restart weave
  28. - name: Weave | Write weave systemd init file
  29. template: src=weave.service.j2 dest=/etc/systemd/system/weave.service
  30. when: ansible_service_mgr == "systemd"
  31. notify: restart weave
  32. - name: Weave | Write weaveproxy systemd init file
  33. template: src=weaveproxy.service.j2 dest=/etc/systemd/system/weaveproxy.service
  34. when: ansible_service_mgr == "systemd"
  35. notify: restart weaveproxy
  36. - name: Weave | Write weaveexpose systemd init file
  37. template: src=weaveexpose.service.j2 dest=/etc/systemd/system/weaveexpose.service
  38. when: ansible_service_mgr == "systemd"
  39. notify: restart weaveexpose
  40. - meta: flush_handlers
  41. - name: Weave | Enable weave
  42. service: name=weave enabled=yes state=started
  43. - name: Weave | Enable weaveproxy
  44. service: name=weaveproxy enabled=yes state=started
  45. - name: Weave | Enable weaveexpose
  46. service: name=weaveexpose enabled=yes state=started