Added more config variables to pleroma.
authorLuke Hoersten <luke@hoersten.org>
Wed, 05 Sep 2018 16:42:56 -0500
changeset 62 63586cf10d46
parent 61 2dd82d9e2103
child 63 56531bbfd074
Added more config variables to pleroma.
roles/nginx/handlers/main.yaml
roles/pleroma/defaults/main.yaml
roles/pleroma/handlers/main.yaml
roles/pleroma/tasks/main.yaml
roles/pleroma/templates/dev.secret.exs.j2
--- a/roles/nginx/handlers/main.yaml	Mon Aug 20 10:22:45 2018 -0500
+++ b/roles/nginx/handlers/main.yaml	Wed Sep 05 16:42:56 2018 -0500
@@ -1,4 +1,5 @@
 ---
+
 - name: restart nginx
   become: yes
   systemd: name="nginx" state="restarted" daemon_reload="yes"
--- a/roles/pleroma/defaults/main.yaml	Mon Aug 20 10:22:45 2018 -0500
+++ b/roles/pleroma/defaults/main.yaml	Wed Sep 05 16:42:56 2018 -0500
@@ -2,4 +2,10 @@
 
 pleroma_user: "pleroma"
 pleroma_instance_name: "{{pleroma_host}}"
+pleroma_host: "localhost"
+pleroma_scheme: "https"
+pleroma_port: 443
 pleroma_admin_email: "[email protected]{{pleroma_host}}"
+pleroma_char_limit: 5000
+pleroma_signup_open: "true"
+pleroma_db_host: "localhost"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/roles/pleroma/handlers/main.yaml	Wed Sep 05 16:42:56 2018 -0500
@@ -0,0 +1,5 @@
+---
+
+- name: restart pleroma
+  become: yes
+  systemd: name="pleroma" state="restarted" daemon_reload="yes"
--- a/roles/pleroma/tasks/main.yaml	Mon Aug 20 10:22:45 2018 -0500
+++ b/roles/pleroma/tasks/main.yaml	Wed Sep 05 16:42:56 2018 -0500
@@ -54,11 +54,13 @@
   with_items:
     - "setup_db.psql"
     - "dev.secret.exs"
+  notify: restart pleroma
 
 - name: install pleroma psql
   become: yes
   become_user: "postgres"
   command: "psql -f ~{{pleroma_user}}/pleroma/config/setup_db.psql"
+  notify: restart pleroma
 
 - name: migrate db
   become: yes
@@ -71,6 +73,7 @@
     - "mix local.rebar --force"
     - "mix deps.get"
     - "mix ecto.migrate"
+  notify: restart pleroma
 
 - name: install pleroma systemd service
   template:
--- a/roles/pleroma/templates/dev.secret.exs.j2	Mon Aug 20 10:22:45 2018 -0500
+++ b/roles/pleroma/templates/dev.secret.exs.j2	Wed Sep 05 16:42:56 2018 -0500
@@ -1,15 +1,15 @@
 use Mix.Config
 
 config :pleroma, Pleroma.Web.Endpoint,
-   url: [host: "{{pleroma_host}}", scheme: "https", port: 443],
+   url: [host: "{{pleroma_host}}", scheme: "{{pleroma_scheme}}", port: {{pleroma_port}}],
    secret_key_base: "{{pleroma_secret_key}}"
 
 config :pleroma, :instance,
   name: "{{pleroma_instance_name}}",
   email: "{{pleroma_admin_email}}",
-  limit: 5000,
-  registrations_open: true,
-  dedupe_media: false
+  limit: {{pleroma_char_limit}},
+  registrations_open: {{pleroma_signup_open}},
+  dedupe_media: true
 
 config :pleroma, :media_proxy,
   enabled: false,
@@ -22,5 +22,5 @@
   username: "{{pleroma_user}}",
   password: "{{pleroma_db_passwd}}",
   database: "{{pleroma_user}}",
-  hostname: "localhost",
+  hostname: "{{pleroma_db_host}}",
   pool_size: 10