From 292c04cbc01b91065701f5b74348c69724d64b16 Mon Sep 17 00:00:00 2001 From: meaz Date: Wed, 17 Jul 2024 18:09:36 +0200 Subject: [PATCH] replace nodejs task by role (#23) WIP as node role PR need to be merged first Co-authored-by: muppeth Reviewed-on: https://git.disroot.org/Disroot-Ansible/etherpad/pulls/23 Reviewed-by: muppeth --- Playbooks/etherpad.yml | 1 + README.MD | 2 +- defaults/main.yml | 5 +++-- tasks/installdeps.yml | 12 ------------ 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Playbooks/etherpad.yml b/Playbooks/etherpad.yml index 1c1a806..ac9c99c 100644 --- a/Playbooks/etherpad.yml +++ b/Playbooks/etherpad.yml @@ -3,6 +3,7 @@ - hosts: etherpad roles: - mariadb + - node - etherpad vars_files: diff --git a/README.MD b/README.MD index bd80b80..70a95b0 100644 --- a/README.MD +++ b/README.MD @@ -12,7 +12,7 @@ Then you can access etherpad from your computer on http://192.168.33.8:9001 ## Playbook -The playbook includes mariadb role and deploys entire stack needed to run Etherpad-lite. Additional role is also available in the Ansible roles repos in git. +The playbook includes mariadb and node roles and deploys entire stack needed to run Etherpad-lite. Additional roles are also available in the Ansible roles repos in git. ## Tags You can use tags when you deploy: diff --git a/defaults/main.yml b/defaults/main.yml index 337e5d3..372d4d3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -51,12 +51,13 @@ etherpad_smtp_host: 'localhost' etherpad_smtp_port: '587' etherpad_smtp_user: 'support' etherpad_smtp_pass: 'changeme' -etherpad_nodejs_version: '21' etherpad_apt: - curl - - nodejs - git +# Nodejs +nodejs_version: '21' + etherpad_admin_page: 'true' # set to something else if you don't want to build admin page etherpad_plugins_list: # set to "removed" if you want to remove à plugin diff --git a/tasks/installdeps.yml b/tasks/installdeps.yml index 3264edd..bc6456e 100644 --- a/tasks/installdeps.yml +++ b/tasks/installdeps.yml @@ -1,17 +1,5 @@ --- -- name: '[INSTALL] - Add Nodesource apt key.' - apt_key: - url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key - state: present - -- name: '[INSTALLDEPS] - Add repository for nodejs' - apt_repository: - repo: deb https://deb.nodesource.com/node_{{ etherpad_nodejs_version }}.x nodistro main - state: present - update_cache: yes - filename: 'nodesource' - - name: '[INSTALLDEPS] - Install dependencies' apt: name: "{{ etherpad_apt }}"