-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ (services): Each service has its own Ansible role
Showing
64 changed files
with
511 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
base_dir: /usr/local/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
fqdn: theobori.cafe | ||
domain: theobori.cafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
tor_unix_socket: unix:/var/run/{{ fqdn }}.sock | ||
tor_unix_socket: unix:/var/run/{{ domain }}.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ services: | |
- ldap_net | ||
ports: | ||
- 127.0.0.1:8083:8083 | ||
restart: always | ||
restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- name: Include service role | ||
ansible.builtin.include_role: | ||
name: "service" | ||
vars: | ||
service_name: "calibre-web" | ||
service_fqdn: "books.{{ domain }}" | ||
service_nginx_port: "8083" | ||
service_certbot: true | ||
service_nginx: true | ||
service_tor: true | ||
service_docker_compose: true | ||
service_systemd_service: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- name: Include service role | ||
ansible.builtin.include_role: | ||
name: "service" | ||
vars: | ||
service_name: "etherpad" | ||
service_fqdn: "etherpad.{{ domain }}" | ||
service_nginx_port: "9001" | ||
service_certbot: true | ||
service_nginx: true | ||
service_tor: true | ||
service_docker_compose: true | ||
service_systemd_service: true | ||
|
||
- name: Copy etherpad environment files | ||
ansible.builtin.template: | ||
src: ".env.j2" | ||
dest: "{{ base_dir }}/etherpad/.env" | ||
mode: "0640" |
4 changes: 2 additions & 2 deletions
4
roles/services/templates/etherpad/.env.j2 → roles/etherpad/templates/.env.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
POSTGRES_PASSWORD={{ etherpad_db_password }} | ||
POSTGRES_USER={{ etherpad_db_user }} | ||
DEFAULT_PAD_TEXT={{ fqdn }} notepad | ||
TITLE={{ fqdn }} | ||
DEFAULT_PAD_TEXT={{ domain }} notepad | ||
TITLE={{ domain }} | ||
ADMIN_PASSWORD={{ etherpad_admin_password }} | ||
POSTGRES_DB=etherpad |
8 changes: 4 additions & 4 deletions
8
...inx/templates/sites-available/etherpad.j2 → roles/etherpad/templates/nginx.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
server { | ||
include listen-443; | ||
server_name {{ item.name }}; | ||
server_name {{ server_name }}; | ||
|
||
include ssl_params; | ||
ssl_certificate /etc/letsencrypt/live/{{ item.name }}/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/{{ item.name }}/privkey.pem; | ||
ssl_certificate /etc/letsencrypt/live/{{ server_name }}/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/{{ server_name }}/privkey.pem; | ||
|
||
include header_params; | ||
add_header Content-Security-Policy "default-src 'none'; frame-src 'self'; img-src 'self' data:; connect-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; style-src-elem 'self' 'unsafe-hashes' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-13Xtc89MSfsDPErm3syFx70NQqw9DB0exK2LYLR9Bes=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; form-action 'self'; object-src 'self'"; | ||
|
||
location / { | ||
include proxy_params; | ||
proxy_pass http://localhost:{{ item.port }}/; | ||
proxy_pass http://localhost:{{ server_port }}/; | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- name: Include service role | ||
ansible.builtin.include_role: | ||
name: "service" | ||
vars: | ||
service_name: "gitea" | ||
service_fqdn: "git.{{ domain }}" | ||
service_nginx_port: "3002" | ||
service_docker_compose: true | ||
service_systemd_service: true | ||
service_certbot: true | ||
service_nginx: true | ||
service_tor: true | ||
|
||
- name: Create the Gitea log directory if not exists | ||
ansible.builtin.file: | ||
path: /usr/local/services/gitea/log | ||
state: directory | ||
owner: "1000" | ||
group: "1000" | ||
mode: "0755" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- name: Include service role | ||
ansible.builtin.include_role: | ||
name: "service" | ||
vars: | ||
service_docker_compose: true | ||
service_systemd_service: true | ||
service_name: "ldap" | ||
|
||
- name: Copy ldap environment files | ||
ansible.builtin.template: | ||
src: ".env.j2" | ||
dest: "{{ base_dir }}/ldap/.env" | ||
mode: "0640" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LDAP_BASE_DN="dc={{ domain | split('.') | first }},dc={{ domain | split('.') | last }}" | ||
LDAP_DOMAIN="{{ domain }}" | ||
LDAP_ADMIN_PASSWORD="{{ ldap_admin_password }}" |
Oops, something went wrong.