mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-26 06:31:04 +01:00
Compare commits
No commits in common. "5fb2872fa29ac2dbfb093611fdb47226c3bf2072" and "4d0db1fcc9368e32ddc042b5ca0be8f6f1341a21" have entirely different histories.
5fb2872fa2
...
4d0db1fcc9
@ -36,40 +36,3 @@ activate_all_timers: false # Activates all timers, independend if the handl
|
|||||||
nginx_matomo_tracking: false # Activates matomo tracking on all html pages
|
nginx_matomo_tracking: false # Activates matomo tracking on all html pages
|
||||||
nginx_www_redirect: true # Implements an redirect from all www. domains to the main domain
|
nginx_www_redirect: true # Implements an redirect from all www. domains to the main domain
|
||||||
execute_updates: true # Executes updates
|
execute_updates: true # Executes updates
|
||||||
|
|
||||||
# Domain Names
|
|
||||||
domain_akaunting: "akaunting.{{top_domain}}"
|
|
||||||
domain_baserow: "baserow.{{top_domain}}"
|
|
||||||
domain_bigbluebutton: "meet.{{top_domain}}"
|
|
||||||
domain_elk: "elk.{{top_domain}}"
|
|
||||||
domain_discourse: "forum.{{top_domain}}"
|
|
||||||
domain_funkwhale: "music.{{top_domain}}"
|
|
||||||
domain_gitea: "git.{{top_domain}}"
|
|
||||||
domain_listmonk: "newsletter.{{top_domain}}"
|
|
||||||
domain_mailu: "mail.{{top_domain}}"
|
|
||||||
domain_mastodon: "microblog.{{top_domain}}"
|
|
||||||
domains_mastodon_alternates: []
|
|
||||||
domain_matomo: "matomo.{{top_domain}}"
|
|
||||||
domain_mediawiki: "wiki.{{top_domain}}"
|
|
||||||
domain_nextcloud: "cloud.{{top_domain}}"
|
|
||||||
domain_pixelfed: "pictures.{{top_domain}}"
|
|
||||||
domains_pixelfed: []
|
|
||||||
domain_peertube: "videos.{{top_domain}}"
|
|
||||||
domains_peertube: []
|
|
||||||
domain_roulette: "roulette.{{top_domain}}"
|
|
||||||
domain_attendize: "tickets.{{top_domain}}"
|
|
||||||
domain_yourls: "s.{{top_domain}}"
|
|
||||||
|
|
||||||
|
|
||||||
# Routings
|
|
||||||
redirect_domain_mappings:
|
|
||||||
- { source: "nextcloud.{{top_domain}}", target: "cloud.{{top_domain}}" }
|
|
||||||
- { source: "gitea.{{top_domain}}", target: "git.{{top_domain}}" }
|
|
||||||
- { source: "listmonk.{{top_domain}}", target: "newsletter.{{top_domain}}" }
|
|
||||||
- { source: "discourse.{{top_domain}}", target: "forum.{{top_domain}}" }
|
|
||||||
- { source: "bbb.{{top_domain}}", target: "meet.{{top_domain}}" }
|
|
||||||
- { source: "short.{{top_domain}}", target: "s.{{top_domain}}" }
|
|
||||||
- { source: "mastodon.{{top_domain}}", target: "microblog.{{top_domain}}" }
|
|
||||||
- { source: "peertube.{{top_domain}}", target: "videos.{{top_domain}}" }
|
|
||||||
- { source: "funkwhale.{{top_domain}}", target: "music.{{top_domain}}" }
|
|
||||||
- { source: "pixelfed.{{top_domain}}", target: "pictures.{{top_domain}}" }
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-nextcloud
|
- role: docker-nextcloud
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_nextcloud}}"
|
domain: cloud.{{top_domain}}
|
||||||
http_port: 8001
|
http_port: 8001
|
||||||
|
|
||||||
- name: setup gitea hosts
|
- name: setup gitea hosts
|
||||||
@ -28,7 +28,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-gitea
|
- role: docker-gitea
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_gitea}}"
|
domain: git.{{top_domain}}
|
||||||
http_port: 8002
|
http_port: 8002
|
||||||
ssh_port: 2201
|
ssh_port: 2201
|
||||||
run_mode: prod
|
run_mode: prod
|
||||||
@ -48,7 +48,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-mediawiki
|
- role: docker-mediawiki
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_mediawiki}}"
|
domain: wiki.{{top_domain}}
|
||||||
http_port: 8004
|
http_port: 8004
|
||||||
|
|
||||||
- name: setup mybb hosts
|
- name: setup mybb hosts
|
||||||
@ -57,7 +57,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-mybb
|
- role: docker-mybb
|
||||||
vars:
|
vars:
|
||||||
domains: "{{domains_mybb}}"
|
domains: "{{mybb_domains}}"
|
||||||
http_port: 8005
|
http_port: 8005
|
||||||
|
|
||||||
- name: setup yourls hosts
|
- name: setup yourls hosts
|
||||||
@ -66,7 +66,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-yourls
|
- role: docker-yourls
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_yourls}}"
|
domain: s.{{top_domain}}
|
||||||
http_port: 8006
|
http_port: 8006
|
||||||
|
|
||||||
- name: setup mailu hosts
|
- name: setup mailu hosts
|
||||||
@ -75,7 +75,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-mailu
|
- role: docker-mailu
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_mailu}}"
|
domain: "mail.{{top_domain}}"
|
||||||
http_port: 8007
|
http_port: 8007
|
||||||
|
|
||||||
- name: setup elk hosts
|
- name: setup elk hosts
|
||||||
@ -84,7 +84,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-elk
|
- role: docker-elk
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_elk}}"
|
domain: "elk.{{top_domain}}"
|
||||||
http_port: 8008
|
http_port: 8008
|
||||||
|
|
||||||
- name: setup mastodon hosts
|
- name: setup mastodon hosts
|
||||||
@ -93,8 +93,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-mastodon
|
- role: docker-mastodon
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_mastodon}}"
|
domain: "mastodon.{{top_domain}}"
|
||||||
domains: "{{ [domain] + domains_mastodon_alternates }}"
|
|
||||||
http_port: 8009
|
http_port: 8009
|
||||||
stream_port: 4001
|
stream_port: 4001
|
||||||
|
|
||||||
@ -104,8 +103,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-pixelfed
|
- role: docker-pixelfed
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_pixelfed}}"
|
domain: pixelfed.{{top_domain}}
|
||||||
domains: "{{ [domain] + domains_pixelfed }}"
|
|
||||||
http_port: 8010
|
http_port: 8010
|
||||||
|
|
||||||
- name: setup peertube hosts
|
- name: setup peertube hosts
|
||||||
@ -114,8 +112,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-peertube
|
- role: docker-peertube
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_peertube}}"
|
domain: peertube.{{top_domain}}
|
||||||
domains: "{{ [domain] + domains_peertube }}"
|
|
||||||
http_port: 8011
|
http_port: 8011
|
||||||
|
|
||||||
- name: setup bigbluebutton hosts
|
- name: setup bigbluebutton hosts
|
||||||
@ -124,15 +121,14 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-bigbluebutton
|
- role: docker-bigbluebutton
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_bigbluebutton}}"
|
domain: bbb.{{top_domain}}
|
||||||
|
|
||||||
- name: setup funkwhale hosts
|
- name: setup funkwhale hosts
|
||||||
hosts: funkwhale
|
hosts: funkwhale
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- role: docker-funkwhale
|
- role: docker-funkwhale
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_funkwhale}}"
|
domain: funkwhale.{{top_domain}}
|
||||||
http_port: 8012
|
http_port: 8012
|
||||||
|
|
||||||
- name: setup roulette-wheel hosts
|
- name: setup roulette-wheel hosts
|
||||||
@ -141,7 +137,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-roulette-wheel
|
- role: docker-roulette-wheel
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_roulette}}"
|
domain: roulette.{{top_domain}}
|
||||||
http_port: 8013
|
http_port: 8013
|
||||||
|
|
||||||
- name: setup joomla hosts
|
- name: setup joomla hosts
|
||||||
@ -159,7 +155,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-attendize
|
- role: docker-attendize
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_attendize}}"
|
domain: "tickets.{{top_domain}}"
|
||||||
http_port: 8015
|
http_port: 8015
|
||||||
mail_interface_http_port: 8016
|
mail_interface_http_port: 8016
|
||||||
|
|
||||||
@ -169,7 +165,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-baserow
|
- role: docker-baserow
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_baserow}}"
|
domain: baserow.{{top_domain}}
|
||||||
http_port: 8017
|
http_port: 8017
|
||||||
|
|
||||||
- name: setup matomo hosts
|
- name: setup matomo hosts
|
||||||
@ -178,7 +174,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-matomo
|
- role: docker-matomo
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_matomo}}"
|
domain: matomo.{{top_domain}}
|
||||||
http_port: 8018
|
http_port: 8018
|
||||||
|
|
||||||
- name: setup listmonk
|
- name: setup listmonk
|
||||||
@ -187,7 +183,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-listmonk
|
- role: docker-listmonk
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_newsletter}}"
|
domain: listmonk.{{top_domain}}
|
||||||
http_port: 8019
|
http_port: 8019
|
||||||
|
|
||||||
- name: setup discourse
|
- name: setup discourse
|
||||||
@ -196,8 +192,8 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-discourse
|
- role: docker-discourse
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_discourse}}"
|
domain: forum.{{top_domain}}
|
||||||
domains: "{{domains_discourse}}"
|
domains: "{{discourse_domains}}"
|
||||||
http_port: 8020
|
http_port: 8020
|
||||||
|
|
||||||
- name: setup akaunting hosts
|
- name: setup akaunting hosts
|
||||||
@ -206,7 +202,7 @@
|
|||||||
roles:
|
roles:
|
||||||
- role: docker-akaunting
|
- role: docker-akaunting
|
||||||
vars:
|
vars:
|
||||||
domain: "{{domain_akaunting}}"
|
domain: akaunting.{{top_domain}}
|
||||||
http_port: 8080
|
http_port: 8080
|
||||||
|
|
||||||
# Native Webserver Roles
|
# Native Webserver Roles
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
- name: "include task certbot-matomo.yml"
|
|
||||||
include_tasks: certbot-matomo.yml
|
|
||||||
|
|
||||||
- name: configure {{domain}}.conf
|
|
||||||
template: src=templates/mastodon.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
|
||||||
notify: restart nginx
|
|
@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: "include create-domains.yml"
|
- name: "include task certbot-matomo.yml"
|
||||||
include_tasks: create-domains.yml
|
include_tasks: certbot-matomo.yml
|
||||||
loop: "{{ domains }}"
|
|
||||||
loop_control:
|
- name: configure {{domain}}.conf
|
||||||
loop_var: domain
|
template: src=templates/mastodon.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||||
|
notify: restart nginx
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
@ -19,4 +20,5 @@
|
|||||||
template:
|
template:
|
||||||
src: .env.production.j2
|
src: .env.production.j2
|
||||||
dest: "{{docker_compose_instance_directory}}.env.production"
|
dest: "{{docker_compose_instance_directory}}.env.production"
|
||||||
|
force: no
|
||||||
notify: recreate mastodon
|
notify: recreate mastodon
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
LOCAL_DOMAIN={{domain}}
|
LOCAL_DOMAIN={{domain}}
|
||||||
ALTERNATE_DOMAINS="{{ domains_mastodon_alternates | join(',') }}"
|
|
||||||
SINGLE_USER_MODE={{mastodon_single_user_mode}}
|
SINGLE_USER_MODE={{mastodon_single_user_mode}}
|
||||||
SECRET_KEY_BASE={{mastodon_secret_key_base}}
|
SECRET_KEY_BASE={{mastodon_secret_key_base}}
|
||||||
OTP_SECRET={{mastodon_otp_secret}}
|
OTP_SECRET={{mastodon_otp_secret}}
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
- name: "include task certbot-matomo.yml"
|
|
||||||
include_tasks: certbot-matomo.yml
|
|
||||||
|
|
||||||
- name: configure {{domain}}.conf
|
|
||||||
template: src=templates/peertube.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
|
||||||
notify: restart nginx
|
|
@ -1,9 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: "include create-domains.yml"
|
- name: "include task certbot-matomo.yml"
|
||||||
include_tasks: create-domains.yml
|
include_tasks: certbot-matomo.yml
|
||||||
loop: "{{ domains }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: domain
|
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
|
||||||
|
upstream backend {
|
||||||
|
server 127.0.0.1:{{http_port}};
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
server_name {{domain}};
|
server_name {{domain}};
|
||||||
|
|
||||||
@ -66,7 +71,7 @@ server {
|
|||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:{{http_port}};
|
proxy_pass http://backend;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /socket.io {
|
location /socket.io {
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
loop: "{{ domains }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: domain
|
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
|
@ -5,13 +5,18 @@
|
|||||||
patterns: '*.*.conf'
|
patterns: '*.*.conf'
|
||||||
register: conf_files
|
register: conf_files
|
||||||
|
|
||||||
|
- name: Print conf_files domains
|
||||||
|
debug:
|
||||||
|
var: conf_files
|
||||||
|
|
||||||
- name: Filter domain names and remove .conf extension and path
|
- name: Filter domain names and remove .conf extension and path
|
||||||
set_fact:
|
set_fact:
|
||||||
filtered_domains: "{{ conf_files.files | map(attribute='path') | map('regex_search', domain_regex) | select('string') | map('regex_replace', '^/etc/nginx/conf.d/', '') | map('regex_replace', '.conf$', '') | list }}"
|
filtered_domains: "{{ conf_files.files | map(attribute='path') | map('regex_search', domain_regex) | select('string') | map('regex_replace', '^/etc/nginx/conf.d/', '') | map('regex_replace', '.conf$', '') | list }}"
|
||||||
vars:
|
vars:
|
||||||
domain_regex: '^/etc/nginx/conf.d/(?!www\.)[^/]+\.conf$'
|
domain_regex: '^/etc/nginx/conf.d/(?!www\.)[^/]+\.conf$'
|
||||||
|
|
||||||
- name: The domains for which a www. redirect will be implemented
|
|
||||||
|
- name: Print filtered domains
|
||||||
debug:
|
debug:
|
||||||
var: filtered_domains
|
var: filtered_domains
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user