ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit dd74e0f452f6e1bb75fb248e851ab2fee0c3dc4e
parent 6e37aed5f31616e52197b6078fd85176ff0ed21d
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 4 Mar 2021 00:31:00 +0100

roles/pleroma: nginx.extraConfig, template config
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/roles/pleroma/tasks/configure.yml b/roles/pleroma/tasks/configure.yml
@@ -1,7 +1,14 @@
 ---
 
+- name: "Create directory: /var/lib/pleroma"
+  file:
+    state: directory
+    path: /var/lib/pleroma
+    owner: pleroma
+    group: pleroma
+
 - name: "Copy config-file to: /etc/pleroma/config.exs" 
-  copy: 
+  template: 
     src: "{{ services.pleroma.configFile }}"
     dest: /etc/pleroma/config.exs
     mode: 0755
diff --git a/roles/pleroma/templates/nginx-vhost.conf.j2 b/roles/pleroma/templates/nginx-vhost.conf.j2
@@ -24,6 +24,10 @@ server {
 		proxy_pass http://127.0.0.1:4000/;
 		include /etc/nginx/proxy.conf;
 	}
+
+	{% if services.pleroma.nginx.extraConfig is defined %}
+	{{ services.pleroma.nginx.extraConfig }}
+	{% endif %}
 }
 
 {% endif %}

@@ -53,5 +57,9 @@ server {
 		proxy_pass http://127.0.0.1:4000/;
 		include /etc/nginx/proxy.conf;
 	}
+
+	{% if services.pleroma.nginx.extraConfig is defined %}
+	{{ services.pleroma.nginx.extraConfig }}
+	{% endif %}
 }
 {% endif %}