mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 00:05:44 +02:00
Update to 2022-02-28 18:00
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
get_url:
|
||||
url: "{{ etherpad_archive_url }}"
|
||||
dest: "{{ etherpad_root_dir }}/tmp"
|
||||
checksum: "sha1:{{ etherpad_archive_sha1 }}"
|
||||
checksum: "sha256:{{ etherpad_archive_sha256 }}"
|
||||
|
||||
- name: Extract etherpad
|
||||
unarchive:
|
||||
@@ -34,41 +34,20 @@
|
||||
tags: etherpad
|
||||
|
||||
- name: Install node modules
|
||||
npm:
|
||||
path: "{{ etherpad_root_dir }}/app/src"
|
||||
state: "{{ (etherpad_install_mode == 'none') | ternary('present','latest') }}"
|
||||
command: sh ./bin/installDeps.sh
|
||||
args:
|
||||
chdir: "{{ etherpad_root_dir }}/app"
|
||||
become_user: "{{ etherpad_user }}"
|
||||
when: etherpad_install_mode != 'none'
|
||||
notify: restart etherpad
|
||||
tags: etherpad
|
||||
|
||||
- name: Install plugins
|
||||
npm:
|
||||
name: ep_{{ item }}
|
||||
path: "{{ etherpad_root_dir }}/app/src"
|
||||
state: "{{ (etherpad_install_mode == 'none') | ternary('present','latest') }}"
|
||||
loop: "{{ etherpad_plugins }}"
|
||||
command: "{{ etherpad_root_dir }}/app/src/node_modules/.bin/npm install --no-save --legacy-peer-deps {{ etherpad_plugins | map('regex_replace', '(.+)', 'ep_\\1') | list | join(' ') }}"
|
||||
args:
|
||||
chdir: "{{ etherpad_root_dir }}/app/"
|
||||
become_user: "{{ etherpad_user }}"
|
||||
notify: restart etherpad
|
||||
tags: etherpad
|
||||
|
||||
- name: Link plugins
|
||||
file: src={{ etherpad_root_dir }}/app/src/node_modules/ep_{{ item }} dest={{ etherpad_root_dir }}/app/node_modules/ep_{{ item }} state=link
|
||||
loop: "{{ etherpad_plugins }}"
|
||||
notify: restart etherpad
|
||||
tags: etherpad
|
||||
|
||||
- name: List linked plugins
|
||||
shell: find {{ etherpad_root_dir }}/app/node_modules/ -type l -maxdepth 1 -mindepth 1 -exec basename "{}" \;
|
||||
register: etherpad_linked_plugins
|
||||
changed_when: False
|
||||
tags: etherpad
|
||||
|
||||
- name: Unlink unmanaged plugins
|
||||
file: path={{ etherpad_root_dir }}/app/node_modules/{{ item }} state=absent
|
||||
loop: "{{ etherpad_linked_plugins.stdout_lines }}"
|
||||
when:
|
||||
- item | regex_replace('^ep_', '') not in etherpad_plugins
|
||||
- item != 'ep_etherpad-lite'
|
||||
when: etherpad_install_mode != 'none'
|
||||
notify: restart etherpad
|
||||
tags: etherpad
|
||||
|
||||
|
@@ -1,17 +1,28 @@
|
||||
---
|
||||
|
||||
- include: user.yml
|
||||
- include: directories.yml
|
||||
- include: facts.yml
|
||||
- include: archive_pre.yml
|
||||
when: etherpad_install_mode == 'upgrade'
|
||||
- include: install.yml
|
||||
- include: conf.yml
|
||||
- include: iptables.yml
|
||||
- include_tasks: user.yml
|
||||
tags: always
|
||||
- include_tasks: directories.yml
|
||||
tags: always
|
||||
- include_tasks: facts.yml
|
||||
tags: always
|
||||
- include_tasks: archive_pre.yml
|
||||
when: etherpad_install_mode | default('none') == 'upgrade'
|
||||
tags: always
|
||||
- include_tasks: install.yml
|
||||
tags: always
|
||||
- include_tasks: conf.yml
|
||||
tags: always
|
||||
- include_tasks: iptables.yml
|
||||
when: iptables_manage | default(True)
|
||||
- include: service.yml
|
||||
- include: write_version.yml
|
||||
- include: archive_post.yml
|
||||
when: etherpad_install_mode == 'upgrade'
|
||||
- include: cleanup.yml
|
||||
tags: always
|
||||
- include_tasks: service.yml
|
||||
tags: always
|
||||
- include_tasks: write_version.yml
|
||||
tags: always
|
||||
- include_tasks: archive_post.yml
|
||||
when: etherpad_install_mode | default('none') == 'upgrade'
|
||||
tags: always
|
||||
- include_tasks: cleanup.yml
|
||||
tags: always
|
||||
|
||||
|
Reference in New Issue
Block a user