From b1efa0922ed7ea9fe95507f667298827fb147bf9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 4 Mar 2022 11:00:06 +0100 Subject: [PATCH] Update to 2022-03-04 11:00 --- roles/appsmith/defaults/main.yml | 4 ++-- roles/appsmith/tasks/install.yml | 35 ++++++++++++++++++++++++++++++++-- roles/appsmith/templates/config_ssh.j2 | 3 +++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 roles/appsmith/templates/config_ssh.j2 diff --git a/roles/appsmith/defaults/main.yml b/roles/appsmith/defaults/main.yml index 490b2a1..31b1bd7 100644 --- a/roles/appsmith/defaults/main.yml +++ b/roles/appsmith/defaults/main.yml @@ -1,11 +1,11 @@ --- # Version to deploy -appsmith_version: 1.6.8 +appsmith_version: 1.6.13 # URL of the source archive appsmith_archive_url: https://github.com/appsmithorg/appsmith/archive/v{{ appsmith_version }}.tar.gz # sha1sum of the archive -appsmith_archive_sha1: d6b693b32460532c86ad325acf9d39b9bccff7e5 +appsmith_archive_sha1: aaa0a5e1814fbbf14526967e7968810a46bdb4a2 # Root directory where appsmith will be installed appsmith_root_dir: /opt/appsmith diff --git a/roles/appsmith/tasks/install.yml b/roles/appsmith/tasks/install.yml index 9b1b5b0..a33bd59 100644 --- a/roles/appsmith/tasks/install.yml +++ b/roles/appsmith/tasks/install.yml @@ -44,6 +44,29 @@ when: appsmith_install_mode == 'upgrade' tags: appsmith +- name: Install N + npm: + name: n + global: yes + state: present + tags: appsmith + +- name: Install node specific version + command: n 14.15.4 + tags: appsmith + +- name: Move old NodeJS + command: mv /usr/bin/node /usr/bin/node-10 + ignore_errors: yes + tags: appsmith + +- name: Move new NodeJS as default + file: + src: /usr/local/bin/node + dest: /usr/bin/node + state: link + tags: appsmith + - when: appsmith_install_mode != 'none' block: @@ -93,7 +116,7 @@ path: "{{ appsmith_root_dir }}/src/app/client" - name: Install NodeJS dependencies - command: ./node_modules/yarn/bin/yarn install --ignore-engines + command: ./node_modules/yarn/bin/yarn install args: chdir: "{{ appsmith_root_dir }}/src/app/client" @@ -109,7 +132,7 @@ - name: Copy the client copy: - src: "{{ appsmith_root_dir }}/src/app/client/build" + src: "{{ appsmith_root_dir }}/src/app/client/build/" dest: "{{ appsmith_root_dir }}/client" remote_src: True @@ -138,6 +161,14 @@ notify: restart appsmith-server tags: appsmith +- name: Install ssh configuration + template: + src: ssh_config.j2 + dest: "{{ appsmith_root_dir }}/.ssh/config" + mode: 600 + owner: "{{ appsmith_user }}" + tags: appsmith + - name: Install pre/post backup hoooks template: src={{ item }}-backup.sh.j2 dest=/etc/backup/{{ item }}.d/appsmith mode=700 loop: diff --git a/roles/appsmith/templates/config_ssh.j2 b/roles/appsmith/templates/config_ssh.j2 new file mode 100644 index 0000000..058d4dd --- /dev/null +++ b/roles/appsmith/templates/config_ssh.j2 @@ -0,0 +1,3 @@ +Host gitea.{{ ansible_domain }} + User gitea + Port 3222