1 - name: create nodejs user
9 - name: create nodejs dir
10 file: path=/var/lib/nodejs state=directory owner=nodejs group=nogroup
11 - name: create etherpad dir
12 file: path=/srv/{{etherpad.domain}} state=directory owner=nodejs group=www-data
13 - name: check out etherpad sources
15 register: etherpad_src
17 dest: /srv/{{etherpad.domain}}/etherpad-lite
18 repo: 'https://github.com/ether/etherpad-lite.git'
21 - name: create etherpad service file
22 register: etherpad_service
24 dest: /etc/systemd/system/etherpad-lite.service
25 src: templates/etherpad-lite.service
26 - name: configure etherpad
27 register: etherpad_settings
29 dest: /srv/{{etherpad.domain}}/etherpad-lite/settings.json
30 src: templates/settings.json
34 - name: (re)start and enable etherpad service
35 when: etherpad_src.changed or etherpad_service.changed or etherpad_settings.changed
36 systemd: name=etherpad-lite state=restarted daemon_reload=yes enabled=yes