diff --git a/handlers/main.yml b/handlers/main.yml index ffa5b85..603a5d2 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,4 +1,20 @@ --- +- name: Build etherpad-lite + ansible.builtin.shell: | + pnpm i + pnpm run build:etherpad + args: + executable: /bin/bash + chdir: "{{ etherpad_path }}" + environment: + NODE_ENV: "development" + PATH: "{{ etherpad_environment_path }}" + become: true + become_user: "{{ etherpad_user }}" + check_mode: false + changed_when: true + notify: Restart etherpad-lite + - name: Restart etherpad-lite ansible.builtin.service: name: etherpad-lite diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 5154af9..751f574 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -5,6 +5,6 @@ roles: - role: ansible-role-etherpad vars: - etherpad_repository_version: 2.0.3 + etherpad_repository_version: 2.2.7 etherpad_api_key: "secure_api_key" etherpad_abiword_enabled: true diff --git a/tasks/main.yml b/tasks/main.yml index 629cc4a..0ef4630 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -41,8 +41,7 @@ depth: 1 become: true become_user: "{{ etherpad_user }}" - register: etherpad_repository - notify: Restart etherpad-lite + notify: Build etherpad-lite - name: Copy configuration file ansible.builtin.template: