diff --git a/roles/etherpad/tasks/main.yml b/roles/etherpad/tasks/main.yml index bf85e66c..84320183 100644 --- a/roles/etherpad/tasks/main.yml +++ b/roles/etherpad/tasks/main.yml @@ -14,8 +14,11 @@ - name: Clone EtherPad git: repo: https://github.com/ether/etherpad-lite.git - dest: /var/www/etherpad-lite + dest: "/var/www/{{ item }}" version: 1.8.4 + loop: + - "etherpad-lite" + - "etherpad-lite-tmp" become: true become_user: etherpad @@ -27,14 +30,20 @@ - name: Install EtherPad systemd unit template: src: systemd/system/etherpad-lite.service.j2 - dest: /etc/systemd/system/etherpad-lite.service + dest: "/etc/systemd/system/{{ item }}.service" + loop: + - "etherpad-lite" + - "etherpad-lite-tmp" - name: Activate EtherPad service systemd: daemon_reload: true - name: etherpad-lite + name: "{{ item }}" enabled: true state: started + loop: + - "etherpad-lite" + - "etherpad-lite-tmp" - name: Indicate role in motd template: diff --git a/roles/etherpad/templates/systemd/system/etherpad-lite.service.j2 b/roles/etherpad/templates/systemd/system/etherpad-lite.service.j2 index 96b02c03..abec8251 100644 --- a/roles/etherpad/templates/systemd/system/etherpad-lite.service.j2 +++ b/roles/etherpad/templates/systemd/system/etherpad-lite.service.j2 @@ -9,7 +9,7 @@ Type=simple User=etherpad Group=etherpad Environment=NODE_ENV=production -ExecStart=/var/www/etherpad-lite/bin/run.sh --stack-size=4096 +ExecStart=/var/www/{{ item }}/bin/run.sh --stack-size=4096 Restart=always RestartSec=5s