mumble-web.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ---
  2. - name: install dependencies
  3. apt:
  4. pkg: websockify
  5. - name: ensure mumble user is present
  6. user:
  7. name: "mumble"
  8. home: "/srv/mumble"
  9. shell: "/bin/bash"
  10. state: present
  11. - name: install mumble-web
  12. git:
  13. repo: "https://github.com/johni0702/mumble-web"
  14. dest: "/srv/mumble/mumble-web"
  15. force: true
  16. become: true
  17. become_user: "mumble"
  18. - name: copy mumble-web unit file
  19. template:
  20. src: mumble-web.service.j2
  21. dest: /etc/systemd/system/mumble-web.service
  22. owner: root
  23. group: root
  24. mode: 0644
  25. register: servicefile
  26. notify: restart mumble-web
  27. - name: Allow to python to inherit socket binding capability
  28. capabilities:
  29. path: /usr/bin/python2.7
  30. capability: cap_net_bind_service=ei
  31. when: servicefile.changed
  32. - name: configure mumble-web
  33. template:
  34. src: config.local.js.j2
  35. dest: "{{ mumble_web_path }}/dist/config.local.js"
  36. owner: root
  37. group: root
  38. mode: 0644
  39. - name: enable and start mumble-web
  40. systemd:
  41. name: mumble-web
  42. daemon-reload: yes
  43. enabled: True
  44. state: started