mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-25 22:21:04 +01:00
Compare commits
No commits in common. "5fb2872fa29ac2dbfb093611fdb47226c3bf2072" and "4d0db1fcc9368e32ddc042b5ca0be8f6f1341a21" have entirely different histories.
5fb2872fa2
...
4d0db1fcc9
@ -32,44 +32,7 @@ path_docker_volumes: "{{path_administrator_home}}volume
|
||||
path_docker_compose_instances: "{{path_administrator_home}}docker-compose/"
|
||||
|
||||
# Runtime Variables
|
||||
activate_all_timers: false # Activates all timers, independend if the handlers had been triggered
|
||||
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
|
||||
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}}" }
|
||||
activate_all_timers: false # Activates all timers, independend if the handlers had been triggered
|
||||
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
|
||||
execute_updates: true # Executes updates
|
@ -19,7 +19,7 @@
|
||||
roles:
|
||||
- role: docker-nextcloud
|
||||
vars:
|
||||
domain: "{{domain_nextcloud}}"
|
||||
domain: cloud.{{top_domain}}
|
||||
http_port: 8001
|
||||
|
||||
- name: setup gitea hosts
|
||||
@ -28,7 +28,7 @@
|
||||
roles:
|
||||
- role: docker-gitea
|
||||
vars:
|
||||
domain: "{{domain_gitea}}"
|
||||
domain: git.{{top_domain}}
|
||||
http_port: 8002
|
||||
ssh_port: 2201
|
||||
run_mode: prod
|
||||
@ -48,7 +48,7 @@
|
||||
roles:
|
||||
- role: docker-mediawiki
|
||||
vars:
|
||||
domain: "{{domain_mediawiki}}"
|
||||
domain: wiki.{{top_domain}}
|
||||
http_port: 8004
|
||||
|
||||
- name: setup mybb hosts
|
||||
@ -57,7 +57,7 @@
|
||||
roles:
|
||||
- role: docker-mybb
|
||||
vars:
|
||||
domains: "{{domains_mybb}}"
|
||||
domains: "{{mybb_domains}}"
|
||||
http_port: 8005
|
||||
|
||||
- name: setup yourls hosts
|
||||
@ -66,7 +66,7 @@
|
||||
roles:
|
||||
- role: docker-yourls
|
||||
vars:
|
||||
domain: "{{domain_yourls}}"
|
||||
domain: s.{{top_domain}}
|
||||
http_port: 8006
|
||||
|
||||
- name: setup mailu hosts
|
||||
@ -75,7 +75,7 @@
|
||||
roles:
|
||||
- role: docker-mailu
|
||||
vars:
|
||||
domain: "{{domain_mailu}}"
|
||||
domain: "mail.{{top_domain}}"
|
||||
http_port: 8007
|
||||
|
||||
- name: setup elk hosts
|
||||
@ -84,7 +84,7 @@
|
||||
roles:
|
||||
- role: docker-elk
|
||||
vars:
|
||||
domain: "{{domain_elk}}"
|
||||
domain: "elk.{{top_domain}}"
|
||||
http_port: 8008
|
||||
|
||||
- name: setup mastodon hosts
|
||||
@ -93,8 +93,7 @@
|
||||
roles:
|
||||
- role: docker-mastodon
|
||||
vars:
|
||||
domain: "{{domain_mastodon}}"
|
||||
domains: "{{ [domain] + domains_mastodon_alternates }}"
|
||||
domain: "mastodon.{{top_domain}}"
|
||||
http_port: 8009
|
||||
stream_port: 4001
|
||||
|
||||
@ -104,8 +103,7 @@
|
||||
roles:
|
||||
- role: docker-pixelfed
|
||||
vars:
|
||||
domain: "{{domain_pixelfed}}"
|
||||
domains: "{{ [domain] + domains_pixelfed }}"
|
||||
domain: pixelfed.{{top_domain}}
|
||||
http_port: 8010
|
||||
|
||||
- name: setup peertube hosts
|
||||
@ -114,8 +112,7 @@
|
||||
roles:
|
||||
- role: docker-peertube
|
||||
vars:
|
||||
domain: "{{domain_peertube}}"
|
||||
domains: "{{ [domain] + domains_peertube }}"
|
||||
domain: peertube.{{top_domain}}
|
||||
http_port: 8011
|
||||
|
||||
- name: setup bigbluebutton hosts
|
||||
@ -124,15 +121,14 @@
|
||||
roles:
|
||||
- role: docker-bigbluebutton
|
||||
vars:
|
||||
domain: "{{domain_bigbluebutton}}"
|
||||
|
||||
domain: bbb.{{top_domain}}
|
||||
- name: setup funkwhale hosts
|
||||
hosts: funkwhale
|
||||
become: true
|
||||
roles:
|
||||
- role: docker-funkwhale
|
||||
vars:
|
||||
domain: "{{domain_funkwhale}}"
|
||||
domain: funkwhale.{{top_domain}}
|
||||
http_port: 8012
|
||||
|
||||
- name: setup roulette-wheel hosts
|
||||
@ -141,7 +137,7 @@
|
||||
roles:
|
||||
- role: docker-roulette-wheel
|
||||
vars:
|
||||
domain: "{{domain_roulette}}"
|
||||
domain: roulette.{{top_domain}}
|
||||
http_port: 8013
|
||||
|
||||
- name: setup joomla hosts
|
||||
@ -159,7 +155,7 @@
|
||||
roles:
|
||||
- role: docker-attendize
|
||||
vars:
|
||||
domain: "{{domain_attendize}}"
|
||||
domain: "tickets.{{top_domain}}"
|
||||
http_port: 8015
|
||||
mail_interface_http_port: 8016
|
||||
|
||||
@ -169,7 +165,7 @@
|
||||
roles:
|
||||
- role: docker-baserow
|
||||
vars:
|
||||
domain: "{{domain_baserow}}"
|
||||
domain: baserow.{{top_domain}}
|
||||
http_port: 8017
|
||||
|
||||
- name: setup matomo hosts
|
||||
@ -178,7 +174,7 @@
|
||||
roles:
|
||||
- role: docker-matomo
|
||||
vars:
|
||||
domain: "{{domain_matomo}}"
|
||||
domain: matomo.{{top_domain}}
|
||||
http_port: 8018
|
||||
|
||||
- name: setup listmonk
|
||||
@ -187,7 +183,7 @@
|
||||
roles:
|
||||
- role: docker-listmonk
|
||||
vars:
|
||||
domain: "{{domain_newsletter}}"
|
||||
domain: listmonk.{{top_domain}}
|
||||
http_port: 8019
|
||||
|
||||
- name: setup discourse
|
||||
@ -196,8 +192,8 @@
|
||||
roles:
|
||||
- role: docker-discourse
|
||||
vars:
|
||||
domain: "{{domain_discourse}}"
|
||||
domains: "{{domains_discourse}}"
|
||||
domain: forum.{{top_domain}}
|
||||
domains: "{{discourse_domains}}"
|
||||
http_port: 8020
|
||||
|
||||
- name: setup akaunting hosts
|
||||
@ -206,7 +202,7 @@
|
||||
roles:
|
||||
- role: docker-akaunting
|
||||
vars:
|
||||
domain: "{{domain_akaunting}}"
|
||||
domain: akaunting.{{top_domain}}
|
||||
http_port: 8080
|
||||
|
||||
# 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"
|
||||
include_tasks: create-domains.yml
|
||||
loop: "{{ domains }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
- 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
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
@ -19,4 +20,5 @@
|
||||
template:
|
||||
src: .env.production.j2
|
||||
dest: "{{docker_compose_instance_directory}}.env.production"
|
||||
force: no
|
||||
notify: recreate mastodon
|
||||
|
@ -1,5 +1,4 @@
|
||||
LOCAL_DOMAIN={{domain}}
|
||||
ALTERNATE_DOMAINS="{{ domains_mastodon_alternates | join(',') }}"
|
||||
SINGLE_USER_MODE={{mastodon_single_user_mode}}
|
||||
SECRET_KEY_BASE={{mastodon_secret_key_base}}
|
||||
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,10 +1,7 @@
|
||||
---
|
||||
- name: "include create-domains.yml"
|
||||
include_tasks: create-domains.yml
|
||||
loop: "{{ domains }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
- name: "include task certbot-matomo.yml"
|
||||
include_tasks: certbot-matomo.yml
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
|
@ -1,3 +1,8 @@
|
||||
|
||||
upstream backend {
|
||||
server 127.0.0.1:{{http_port}};
|
||||
}
|
||||
|
||||
server {
|
||||
server_name {{domain}};
|
||||
|
||||
@ -66,7 +71,7 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://127.0.0.1:{{http_port}};
|
||||
proxy_pass http://backend;
|
||||
}
|
||||
|
||||
location /socket.io {
|
||||
|
@ -1,9 +1,6 @@
|
||||
---
|
||||
- name: "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}}"
|
||||
file:
|
||||
|
@ -5,13 +5,18 @@
|
||||
patterns: '*.*.conf'
|
||||
register: conf_files
|
||||
|
||||
- name: Print conf_files domains
|
||||
debug:
|
||||
var: conf_files
|
||||
|
||||
- name: Filter domain names and remove .conf extension and path
|
||||
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 }}"
|
||||
vars:
|
||||
domain_regex: '^/etc/nginx/conf.d/(?!www\.)[^/]+\.conf$'
|
||||
|
||||
- name: The domains for which a www. redirect will be implemented
|
||||
|
||||
- name: Print filtered domains
|
||||
debug:
|
||||
var: filtered_domains
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user