mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-25 06:01:04 +01:00
Compare commits
2 Commits
4d0db1fcc9
...
5fb2872fa2
Author | SHA1 | Date | |
---|---|---|---|
5fb2872fa2 | |||
58f95508d8 |
@ -32,7 +32,44 @@ 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
|
||||
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}}" }
|
||||
|
@ -19,7 +19,7 @@
|
||||
roles:
|
||||
- role: docker-nextcloud
|
||||
vars:
|
||||
domain: cloud.{{top_domain}}
|
||||
domain: "{{domain_nextcloud}}"
|
||||
http_port: 8001
|
||||
|
||||
- name: setup gitea hosts
|
||||
@ -28,7 +28,7 @@
|
||||
roles:
|
||||
- role: docker-gitea
|
||||
vars:
|
||||
domain: git.{{top_domain}}
|
||||
domain: "{{domain_gitea}}"
|
||||
http_port: 8002
|
||||
ssh_port: 2201
|
||||
run_mode: prod
|
||||
@ -48,7 +48,7 @@
|
||||
roles:
|
||||
- role: docker-mediawiki
|
||||
vars:
|
||||
domain: wiki.{{top_domain}}
|
||||
domain: "{{domain_mediawiki}}"
|
||||
http_port: 8004
|
||||
|
||||
- name: setup mybb hosts
|
||||
@ -57,7 +57,7 @@
|
||||
roles:
|
||||
- role: docker-mybb
|
||||
vars:
|
||||
domains: "{{mybb_domains}}"
|
||||
domains: "{{domains_mybb}}"
|
||||
http_port: 8005
|
||||
|
||||
- name: setup yourls hosts
|
||||
@ -66,7 +66,7 @@
|
||||
roles:
|
||||
- role: docker-yourls
|
||||
vars:
|
||||
domain: s.{{top_domain}}
|
||||
domain: "{{domain_yourls}}"
|
||||
http_port: 8006
|
||||
|
||||
- name: setup mailu hosts
|
||||
@ -75,7 +75,7 @@
|
||||
roles:
|
||||
- role: docker-mailu
|
||||
vars:
|
||||
domain: "mail.{{top_domain}}"
|
||||
domain: "{{domain_mailu}}"
|
||||
http_port: 8007
|
||||
|
||||
- name: setup elk hosts
|
||||
@ -84,7 +84,7 @@
|
||||
roles:
|
||||
- role: docker-elk
|
||||
vars:
|
||||
domain: "elk.{{top_domain}}"
|
||||
domain: "{{domain_elk}}"
|
||||
http_port: 8008
|
||||
|
||||
- name: setup mastodon hosts
|
||||
@ -93,7 +93,8 @@
|
||||
roles:
|
||||
- role: docker-mastodon
|
||||
vars:
|
||||
domain: "mastodon.{{top_domain}}"
|
||||
domain: "{{domain_mastodon}}"
|
||||
domains: "{{ [domain] + domains_mastodon_alternates }}"
|
||||
http_port: 8009
|
||||
stream_port: 4001
|
||||
|
||||
@ -103,7 +104,8 @@
|
||||
roles:
|
||||
- role: docker-pixelfed
|
||||
vars:
|
||||
domain: pixelfed.{{top_domain}}
|
||||
domain: "{{domain_pixelfed}}"
|
||||
domains: "{{ [domain] + domains_pixelfed }}"
|
||||
http_port: 8010
|
||||
|
||||
- name: setup peertube hosts
|
||||
@ -112,7 +114,8 @@
|
||||
roles:
|
||||
- role: docker-peertube
|
||||
vars:
|
||||
domain: peertube.{{top_domain}}
|
||||
domain: "{{domain_peertube}}"
|
||||
domains: "{{ [domain] + domains_peertube }}"
|
||||
http_port: 8011
|
||||
|
||||
- name: setup bigbluebutton hosts
|
||||
@ -121,14 +124,15 @@
|
||||
roles:
|
||||
- role: docker-bigbluebutton
|
||||
vars:
|
||||
domain: bbb.{{top_domain}}
|
||||
domain: "{{domain_bigbluebutton}}"
|
||||
|
||||
- name: setup funkwhale hosts
|
||||
hosts: funkwhale
|
||||
become: true
|
||||
roles:
|
||||
- role: docker-funkwhale
|
||||
vars:
|
||||
domain: funkwhale.{{top_domain}}
|
||||
domain: "{{domain_funkwhale}}"
|
||||
http_port: 8012
|
||||
|
||||
- name: setup roulette-wheel hosts
|
||||
@ -137,7 +141,7 @@
|
||||
roles:
|
||||
- role: docker-roulette-wheel
|
||||
vars:
|
||||
domain: roulette.{{top_domain}}
|
||||
domain: "{{domain_roulette}}"
|
||||
http_port: 8013
|
||||
|
||||
- name: setup joomla hosts
|
||||
@ -155,7 +159,7 @@
|
||||
roles:
|
||||
- role: docker-attendize
|
||||
vars:
|
||||
domain: "tickets.{{top_domain}}"
|
||||
domain: "{{domain_attendize}}"
|
||||
http_port: 8015
|
||||
mail_interface_http_port: 8016
|
||||
|
||||
@ -165,7 +169,7 @@
|
||||
roles:
|
||||
- role: docker-baserow
|
||||
vars:
|
||||
domain: baserow.{{top_domain}}
|
||||
domain: "{{domain_baserow}}"
|
||||
http_port: 8017
|
||||
|
||||
- name: setup matomo hosts
|
||||
@ -174,7 +178,7 @@
|
||||
roles:
|
||||
- role: docker-matomo
|
||||
vars:
|
||||
domain: matomo.{{top_domain}}
|
||||
domain: "{{domain_matomo}}"
|
||||
http_port: 8018
|
||||
|
||||
- name: setup listmonk
|
||||
@ -183,7 +187,7 @@
|
||||
roles:
|
||||
- role: docker-listmonk
|
||||
vars:
|
||||
domain: listmonk.{{top_domain}}
|
||||
domain: "{{domain_newsletter}}"
|
||||
http_port: 8019
|
||||
|
||||
- name: setup discourse
|
||||
@ -192,8 +196,8 @@
|
||||
roles:
|
||||
- role: docker-discourse
|
||||
vars:
|
||||
domain: forum.{{top_domain}}
|
||||
domains: "{{discourse_domains}}"
|
||||
domain: "{{domain_discourse}}"
|
||||
domains: "{{domains_discourse}}"
|
||||
http_port: 8020
|
||||
|
||||
- name: setup akaunting hosts
|
||||
@ -202,7 +206,7 @@
|
||||
roles:
|
||||
- role: docker-akaunting
|
||||
vars:
|
||||
domain: akaunting.{{top_domain}}
|
||||
domain: "{{domain_akaunting}}"
|
||||
http_port: 8080
|
||||
|
||||
# Native Webserver Roles
|
||||
|
6
roles/docker-mastodon/tasks/create-domains.yml
Normal file
6
roles/docker-mastodon/tasks/create-domains.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- 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,10 +1,9 @@
|
||||
---
|
||||
- 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: "include create-domains.yml"
|
||||
include_tasks: create-domains.yml
|
||||
loop: "{{ domains }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
@ -20,5 +19,4 @@
|
||||
template:
|
||||
src: .env.production.j2
|
||||
dest: "{{docker_compose_instance_directory}}.env.production"
|
||||
force: no
|
||||
notify: recreate mastodon
|
||||
|
@ -1,4 +1,5 @@
|
||||
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}}
|
||||
|
6
roles/docker-peertube/tasks/create-domains.yml
Normal file
6
roles/docker-peertube/tasks/create-domains.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- 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,7 +1,10 @@
|
||||
---
|
||||
- name: "include task certbot-matomo.yml"
|
||||
include_tasks: certbot-matomo.yml
|
||||
|
||||
- name: "include create-domains.yml"
|
||||
include_tasks: create-domains.yml
|
||||
loop: "{{ domains }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
|
@ -1,8 +1,3 @@
|
||||
|
||||
upstream backend {
|
||||
server 127.0.0.1:{{http_port}};
|
||||
}
|
||||
|
||||
server {
|
||||
server_name {{domain}};
|
||||
|
||||
@ -71,7 +66,7 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://backend;
|
||||
proxy_pass http://127.0.0.1:{{http_port}};
|
||||
}
|
||||
|
||||
location /socket.io {
|
||||
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
- 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,18 +5,13 @@
|
||||
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: Print filtered domains
|
||||
- name: The domains for which a www. redirect will be implemented
|
||||
debug:
|
||||
var: filtered_domains
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user