1 - name: create nodejs user
8 - name: create etherpad dir
9 file: path=/srv/{{etherpad.domain}} state=directory owner=nodejs group=www-data
10 - name: check out etherpad sources
12 register: etherpad_src
14 dest: /srv/{{etherpad.domain}}/etherpad-lite
15 repo: 'https://github.com/ether/etherpad-lite.git'
18 - name: create etherpad service file
19 register: etherpad_service
21 dest: /etc/systemd/system/etherpad-lite.service
22 src: templates/etherpad-lite.service
23 - name: configure etherpad
24 register: etherpad_settings
26 dest: /srv/{{etherpad.domain}}/etherpad-lite/settings.json
27 src: templates/settings.json
31 - name: (re)start and enable etherpad service
32 when: etherpad_src.changed or etherpad_service.changed or etherpad_settings.changed
33 systemd: name=etherpad-lite state=restarted daemon_reload=yes enabled=yes