summaryrefslogtreecommitdiffstats
path: root/roles/upload/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/upload/tasks')
-rw-r--r--roles/upload/tasks/main.yml25
1 files changed, 20 insertions, 5 deletions
diff --git a/roles/upload/tasks/main.yml b/roles/upload/tasks/main.yml
index 57d21a2..3e7e615 100644
--- a/roles/upload/tasks/main.yml
+++ b/roles/upload/tasks/main.yml
@@ -4,15 +4,16 @@
apt:
update_cache: yes
name:
- - gpg
+ - gnupg
- sudo
- - name: Add nodesource key
+ state: present
+ - name: Import the NodeSource GPG key into apt
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
- name: Add nodesource repository
ansible.builtin.apt_repository:
- repo: deb https://deb.nodesource.com/node_13.x buster main
+ repo: deb https://deb.nodesource.com/node_20.x nodistro main
update_cache: yes
- name: Install packages
apt:
@@ -33,12 +34,12 @@
state: directory
- name: Install precompiled version
unarchive:
- src: https://github.com/psi-4ward/psitransfer/releases/download/v2.1.1/psitransfer-v2.1.1.tar.gz
+ src: https://github.com/psi-4ward/psitransfer/releases/download/v2.1.2/psitransfer-v2.1.2.tar.gz
dest: "/home/{{ upload_user }}"
remote_src: yes
- name: Create link
file:
- src: "/home/{{ upload_user }}/psitransfer-v2.1.1"
+ src: "/home/{{ upload_user }}/psitransfer-v2.1.2"
dest: "/home/{{ upload_user }}/psitransfer"
state: link
- name: Upload production config
@@ -46,6 +47,20 @@
template:
src: config.production.js
dest: "/home/{{ upload_user }}/psitransfer/config.production.js"
+- name: Copy the SSL key
+ become: true
+ copy:
+ remote_src: yes
+ src: "{{ upload_ssl_key }}"
+ dest: "/home/{{ upload_user }}/privkey.pem"
+- name: Copy the SSL cert
+ become: true
+ copy:
+ remote_src: yes
+ src: "{{ upload_ssl_cert }}"
+ dest: "/home/{{ upload_user }}/fullchain.pem"
+ owner: "{{ upload_user }}"
+ group: "{{ upload_group }}"
- name: Install dependencies
npm:
path: "/home/{{ upload_user }}/psitransfer"