webapps/etherpad > lint

This commit is contained in:
Ludovic Poujol 2024-06-21 10:48:31 +02:00
parent 18c30b72c1
commit c219b37aa6
Signed by: lpoujol
SSH key fingerprint: SHA256:YZbQWfjHONnvIGkFZMs0xRKtqzqGqwtZU+kCOKhZXPA
2 changed files with 15 additions and 10 deletions

View file

@ -4,7 +4,7 @@
- name: Install main system dependencies
ansible.builtin.apt:
name: "{{ etherpad_system_dep }}"
update_cache: yes
update_cache: true
- name: Install pnpm (via npm)
ansible.builtin.command:
@ -15,7 +15,7 @@
path: /usr/local/lib/node_modules/
state: directory
mode: o+rx
recurse: yes
recurse: true
- name: Add UNIX account
ansible.builtin.user:
@ -38,7 +38,7 @@
repo: "{{ etherpad_git_url }}"
dest: "~/etherpad-lite/"
version: "{{ etherpad_git_version | default(omit) }}"
update: yes
update: true
force: true
umask: '0022'
become_user: "{{ service }}"
@ -72,8 +72,8 @@
- name: Enable systemd unit
ansible.builtin.systemd:
name: "{{ service }}.service"
enabled: yes
daemon_reload: yes
enabled: true
daemon_reload: true
notify:
- restart etherpad
@ -88,6 +88,7 @@
register: ssl
- name: Generate certificate only if required (first time)
when: ssl.stat.exists != true
block:
- name: Template vhost without SSL for successfull LE challengce
ansible.builtin.template:
@ -100,6 +101,7 @@
state: link
notify:
- reload nginx
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- name: Make sure /var/lib/letsencrypt exists and has correct permissions
@ -107,19 +109,22 @@
path: /var/lib/letsencrypt
state: directory
mode: '0755'
- name: Generate certificate with certbot
ansible.builtin.command:
cmd: certbot certonly --webroot --webroot-path /var/lib/letsencrypt --non-interactive --agree-tos --email {{ etherpad_certbot_admin_email }} -d {{ etherpad_domains | first }}
- name: Create the ssl dir if needed
ansible.builtin.file:
path: /etc/nginx/ssl
state: directory
mode: '0750'
- name: Template ssl bloc for nginx vhost
ansible.builtin.template:
src: "ssl.conf.j2"
dest: "/etc/nginx/ssl/{{ etherpad_domains |first }}.conf"
when: ssl.stat.exists != true
- name: (Re)check if SSL certificate is present and register result
ansible.builtin.stat:

View file

@ -17,7 +17,7 @@
repo: "{{ etherpad_git_url }}"
dest: "~/etherpad-lite/"
version: "{{ etherpad_git_version }}"
update: yes
update: true
force: true
become_user: "{{ service }}"