Browse Source

madonnadiddio

lesion 2 years ago
parent
commit
28a0d5e356
5 changed files with 42 additions and 9 deletions
  1. 7 0
      frontend.yml
  2. 1 1
      infra.yml
  3. 3 0
      inventory.yml
  4. 1 1
      roles/stable/nginx/tasks/certbot.yml
  5. 30 7
      vars/frontend.yml

+ 7 - 0
frontend.yml

@@ -0,0 +1,7 @@
+---
+## FRONTEND
+- name: Frontend
+  hosts: frontend2
+  roles: ['stable/common', 'stable/nginx']
+  vars_files: vars/frontend.yml
+  tags: frontend

+ 1 - 1
infra.yml

@@ -1,7 +1,7 @@
 ---
 ## FRONTEND
 - name: Frontend
-  hosts: frontend
+  hosts: frontend2
   roles: ['stable/common', 'stable/nginx']
   vars_files: vars/frontend.yml
   tags: frontend

+ 3 - 0
inventory.yml

@@ -22,6 +22,9 @@ farma:
 frontend:
   hosts: cisti.frontend
 
+frontend2:
+  hosts: cisti.frontend2
+
 radicale:
   hosts: cisti.cal
 

+ 1 - 1
roles/stable/nginx/tasks/certbot.yml

@@ -17,7 +17,7 @@
 
 - name: Generate certificate if needed
   become: yes
-  command: /snap/bin/certbot --nginx --non-interactive --agree-tos
+  command: /snap/bin/certbot --nginx --non-interactive --agree-tos --expand
       --domains {{ fpm_services | items2dict(key_name='server_name', value_name='server_name') | join(',') }}
         {{ reverse_services | items2dict(key_name='server_name', value_name='server_name') | join(',') }}
       --email {{certbot_email}}

+ 30 - 7
vars/frontend.yml

@@ -1,10 +1,33 @@
 ---
 with_certbot: true
 certbot_email: info@cisti.org
-servers:
-  - cicles:
-    server_name: antani.cisti.org
-    proxy_pass: http://localhost:8001
-    custom_config: |
-      sendfile             on;
-      client_max_body_size 500m;
+reverse_services:
+  - pad:
+    server_name: pad.cisti.org
+    proxy_pass: http://192.168.200.12:8001
+  
+  - gancio:
+    server_name: gancio.cisti.org
+    proxy_pass: http://192.168.200.14:13120
+
+  - mastodon:
+    server_name: mastodon.cisti.org
+    proxy_pass: http://192.168.200.13:80
+
+  - cisti:
+    server_name: cisti.org
+    proxy_pass: http://192.168.200.10
+  
+  - facciamo:
+    server_name: facciamo.cisti.org
+    proxy_pass: http://192.168.200.10
+
+  - fdroid:
+    server_name: fdroid.cisti.org
+    proxy_pass: http://192.168.200.10
+  
+  - farma:
+    server_name: farma.cisti.org
+    proxy_pass: http://192.168.200.10
+
+