Added conditional soapbox config.
authorLuke Hoersten <luke@hoersten.org>
Wed, 08 Jul 2020 15:46:28 -0500
changeset 121 6b9694f833a4
parent 120 7b3b01948954
child 122 cde9702e3bff
Added conditional soapbox config.
pleroma/otp/tasks/main.yaml
pleroma/otp/tasks/soapbox.yaml
--- a/pleroma/otp/tasks/main.yaml	Tue Jul 07 15:11:55 2020 -0500
+++ b/pleroma/otp/tasks/main.yaml	Wed Jul 08 15:46:28 2020 -0500
@@ -77,26 +77,10 @@
     group: "pleroma"
   changed_when: false
 
-- name: download and unarchive soapbox frontend
-  unarchive:
-    src: "{{pleroma_soapbox_download_url}}"
-    dest: "/tmp/"
-    creates: "/tmp/static"
-    remote_src: yes
+- name: install soapbox frontend
+  include_tasks: soapbox.yaml
   when: pleroma_soapbox
 
-- name: install soapbox frontend
-  become: yes
-  copy:
-    remote_src: true
-    src: "/tmp/static/"
-    dest: "{{pleroma_data_dir}}/{{pleroma_instance}}/static/"
-    owner: "pleroma"
-    group: "pleroma"
-    mode: "0755"
-  when: pleroma_soapbox
-  changed_when: false
-
 - name: configure pleroma systemd service
   become: yes
   copy:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pleroma/otp/tasks/soapbox.yaml	Wed Jul 08 15:46:28 2020 -0500
@@ -0,0 +1,29 @@
+---
+
+- name: download and unarchive soapbox frontend
+  unarchive:
+    src: "{{pleroma_soapbox_download_url}}"
+    dest: "/tmp/"
+    creates: "/tmp/static"
+    remote_src: yes
+
+- name: install soapbox frontend
+  become: yes
+  copy:
+    remote_src: true
+    src: "/tmp/static/"
+    dest: "{{pleroma_data_dir}}/{{pleroma_instance}}/static/"
+    owner: "pleroma"
+    group: "pleroma"
+    mode: "0755"
+  changed_when: false
+
+- name: install soapbox config
+  become: yes
+  copy:
+    src: "files/{{pleroma_link_host}}/soapbox.json"
+    dest: "{{pleroma_data_dir}}/{{pleroma_instance}}/static/instance/soapbox.json"
+    owner: "pleroma"
+    group: "pleroma"
+    mode: "0755"
+  changed_when: false