summaryrefslogtreecommitdiffstats
path: root/roles/pad/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/pad/tasks/main.yml')
-rw-r--r--roles/pad/tasks/main.yml152
1 files changed, 96 insertions, 56 deletions
diff --git a/roles/pad/tasks/main.yml b/roles/pad/tasks/main.yml
index 5fcd2a3..e2836a6 100644
--- a/roles/pad/tasks/main.yml
+++ b/roles/pad/tasks/main.yml
@@ -35,66 +35,106 @@
home: /home/etherpad
shell: /bin/bash
state: present
-- import_tasks: mariadb.yml
- become: true
-- name: Set up etherpad as the etherpad user
- tags: etherpad-src
- become: true
- become_user: "{{ etherpad_user }}"
- block:
- - name: Install etherpad
- git:
- repo: https://github.com/ether/etherpad-lite.git
- dest: "{{ etherpad_path }}"
- version: v1.9.7
- depth: 1
- - name: Configure etherpad
- template:
- src: templates/settings.json
- dest: "{{ etherpad_path }}/settings.json"
- - name: Install dependencies
- shell: cd {{ etherpad_path }}; . src/bin/functions.sh; src/bin/installDeps.sh
- # - name: Install etherpad plugins
- # npm:
- # name: ep_scrolltoanchor
- # path: "{{ etherpad_path }}"
- - name: Change ownership
- file:
- dest: /home/etherpad/etherpad
- owner: "{{ etherpad_user }}"
- group: "{{ etherpad_group }}"
- recurse: true
- - name: Set etherpad API key
- copy:
- content: "{{ etherpad_api_key }}"
- dest: "{{ etherpad_path }}/APIKEY.txt"
- owner: "{{ etherpad_user }}"
- mode: "0600"
-- name: Install init.d configuration
- tags: system
- become: true
- template:
- src: etherpad.init.d
- dest: /etc/init.d/etherpad
- owner: root
- group: root
- mode: 0755
- when: use_initd
-- name: Install systemd configuration
- tags: system
- become: true
- template:
- src: etherpad.service
- dest: /etc/systemd/system/etherpad.service
- owner: root
- group: root
- mode: 0755
- when: not use_initd
+ - name: Install pnpm
+ community.general.npm:
+ name: pnpm
+ global: true
+ - name: Install Etherpad
+ include_role:
+ name: systemli.etherpad
+ - name: Install MySQL packages
+ apt:
+ name:
+ - mariadb-server
+ - mariadb-client
+ - python3-mysqldb
+ state: present
+ - name: Ensure mysql is configured to bind only to localhost
+ ini_file:
+ dest: /etc/mysql/my.cnf
+ section: mysqld
+ option: "bind-address"
+ value: "127.0.0.1"
+ - name: Ensure anonymous users are not in the database
+ mysql_user:
+ name: ""
+ host: "{{ item }}"
+ state: absent
+ with_items:
+ - localhost
+ - 127.0.0.1
+ - ::1
+ - "%"
+ - name: Start MariaDB
+ service:
+ name: mysql
+ state: restarted
+ enabled: yes
+ runlevel:
+ - 3
+ - 5
+
+# - import_tasks: mariadb.yml
+# become: true
+# - name: Set up etherpad as the etherpad user
+# tags: etherpad-src
+# become: true
+# become_user: "{{ etherpad_user }}"
+# block:
+# - name: Install etherpad
+# git:
+# repo: https://github.com/ether/etherpad-lite.git
+# dest: "{{ etherpad_path }}"
+# version: v1.9.7
+# depth: 1
+# - name: Configure etherpad
+# template:
+# src: templates/settings.json
+# dest: "{{ etherpad_path }}/settings.json"
+# - name: Install dependencies
+# shell: cd {{ etherpad_path }}; . src/bin/functions.sh; src/bin/installDeps.sh
+# # - name: Install etherpad plugins
+# # npm:
+# # name: ep_scrolltoanchor
+# # path: "{{ etherpad_path }}"
+# - name: Change ownership
+# file:
+# dest: /home/etherpad/etherpad
+# owner: "{{ etherpad_user }}"
+# group: "{{ etherpad_group }}"
+# recurse: true
+# - name: Set etherpad API key
+# copy:
+# content: "{{ etherpad_api_key }}"
+# dest: "{{ etherpad_path }}/APIKEY.txt"
+# owner: "{{ etherpad_user }}"
+# mode: "0600"
+# - name: Install init.d configuration
+# tags: system
+# become: true
+# template:
+# src: etherpad.init.d
+# dest: /etc/init.d/etherpad
+# owner: root
+# group: root
+# mode: 0755
+# when: use_initd
+# - name: Install systemd configuration
+# tags: system
+# become: true
+# template:
+# src: etherpad.service
+# dest: /etc/systemd/system/etherpad.service
+# owner: root
+# group: root
+# mode: 0755
+# when: not use_initd
- name: Restart Etherpad
become: true
service:
- name: etherpad
+ name: etherpad-lite
state: restarted
+ enabled: yes
- tags: create-pads
include_vars:
file: talks.json