--- - name: Install Etherpad dependencies ansible.builtin.apt: update_cache: true name: - libssl-dev - pkg-config - build-essential - nodejs register: apt_result retries: 3 until: apt_result is succeeded - name: Clone EtherPad ansible.builtin.git: repo: https://github.com/ether/etherpad-lite.git dest: /var/www/{{ item.name }} version: 1.8.4 loop: "{{ etherpad.instances }}" become: true become_user: etherpad notify: Restart Etherpad - name: Configure EtherPad ansible.builtin.template: src: etherpad/settings.json.j2 dest: /var/www/{{ item.name }}/settings.json owner: etherpad group: etherpad mode: 0600 loop: "{{ etherpad.instances }}" notify: Restart Etherpad - name: Install delete_after_delay module community.general.npm: name: ep_delete_after_delay path: /var/www/{{ item.name }}/node_modules state: "{% if item.temporary.enabled is defined and item.temporary.enabled %}present{% else %}absent{% endif %}" loop: "{{ etherpad.instances }}" become: true become_user: etherpad notify: Restart Etherpad - name: Install EtherPad systemd unit ansible.builtin.template: src: systemd/system/etherpad-lite.service.j2 dest: /etc/systemd/system/{{ item.name }}.service loop: "{{ etherpad.instances }}" notify: Restart Etherpad - name: Activate EtherPad service ansible.builtin.systemd: daemon_reload: true name: "{{ item.name }}" enabled: true state: started loop: "{{ etherpad.instances }}" - name: Indicate role in motd ansible.builtin.template: src: update-motd.d/05-service.j2 dest: /etc/update-motd.d/05-etherpad mode: 0755