Compare commits
4 Commits
d71bfdbe6f
...
e1ed70b055
Author | SHA1 | Date | |
---|---|---|---|
e1ed70b055 | |||
2febec023f | |||
dbc9f7d6ae | |||
e59f9ce63e |
@ -3,19 +3,23 @@ all:
|
|||||||
vars:
|
vars:
|
||||||
ansible_user: ansible
|
ansible_user: ansible
|
||||||
children:
|
children:
|
||||||
desktop:
|
desultd:
|
||||||
hosts:
|
vars:
|
||||||
#vm-rice-0:
|
ansible_become: yes
|
||||||
# ansible_host: 192.168.122.14
|
children:
|
||||||
#dsk-cstm-0.desu.ltd:
|
desktop:
|
||||||
lap-s76-lemp9-0.desu.ltd:
|
hosts:
|
||||||
db:
|
#vm-rice-0:
|
||||||
hosts:
|
# ansible_host: 192.168.122.14
|
||||||
psql1.9iron.club:
|
#dsk-cstm-0.desu.ltd:
|
||||||
psql1.desu.ltd:
|
lap-s76-lemp9-0.desu.ltd:
|
||||||
web:
|
db:
|
||||||
hosts:
|
hosts:
|
||||||
web1.desu.ltd:
|
psql1.9iron.club:
|
||||||
game:
|
psql1.desu.ltd:
|
||||||
hosts:
|
web:
|
||||||
game1.thefuck.how:
|
hosts:
|
||||||
|
web1.desu.ltd:
|
||||||
|
game:
|
||||||
|
hosts:
|
||||||
|
game1.thefuck.how:
|
||||||
|
@ -7,13 +7,11 @@
|
|||||||
- role: backup
|
- role: backup
|
||||||
vars:
|
vars:
|
||||||
backup_script: s3pgdump
|
backup_script: s3pgdump
|
||||||
become: yes
|
|
||||||
tags: [ backup ]
|
tags: [ backup ]
|
||||||
- role: motd
|
- role: motd
|
||||||
vars:
|
vars:
|
||||||
motd_watch_services_extra:
|
motd_watch_services_extra:
|
||||||
- postgresql
|
- postgresql
|
||||||
become: yes
|
|
||||||
tags: [ motd ]
|
tags: [ motd ]
|
||||||
- role: postgresql
|
- role: postgresql
|
||||||
vars:
|
vars:
|
||||||
@ -37,20 +35,17 @@
|
|||||||
owner: gitea-desultd
|
owner: gitea-desultd
|
||||||
- name: nextcloud-desultd
|
- name: nextcloud-desultd
|
||||||
owner: nextcloud-desultd
|
owner: nextcloud-desultd
|
||||||
become: yes
|
|
||||||
tags: [ db, psql ]
|
tags: [ db, psql ]
|
||||||
- hosts: psql1.9iron.club
|
- hosts: psql1.9iron.club
|
||||||
roles:
|
roles:
|
||||||
- role: backup
|
- role: backup
|
||||||
vars:
|
vars:
|
||||||
backup_script: s3pgdump
|
backup_script: s3pgdump
|
||||||
become: yes
|
|
||||||
tags: [ backup ]
|
tags: [ backup ]
|
||||||
- role: motd
|
- role: motd
|
||||||
vars:
|
vars:
|
||||||
motd_watch_services_extra:
|
motd_watch_services_extra:
|
||||||
- postgresql
|
- postgresql
|
||||||
become: yes
|
|
||||||
tags: [ motd ]
|
tags: [ motd ]
|
||||||
- role: postgresql
|
- role: postgresql
|
||||||
vars:
|
vars:
|
||||||
@ -86,5 +81,4 @@
|
|||||||
lc_collate: C
|
lc_collate: C
|
||||||
lc_ctype: C
|
lc_ctype: C
|
||||||
owner: matrix
|
owner: matrix
|
||||||
become: yes
|
|
||||||
tags: [ db, psql ]
|
tags: [ db, psql ]
|
||||||
|
@ -9,14 +9,12 @@
|
|||||||
path: /etc/mono/config
|
path: /etc/mono/config
|
||||||
insertafter: "<configuration>"
|
insertafter: "<configuration>"
|
||||||
line: '<dllmap dll="lzo2.dll" target="liblzo2.so.2" os="!windows"/>'
|
line: '<dllmap dll="lzo2.dll" target="liblzo2.so.2" os="!windows"/>'
|
||||||
become: yes
|
|
||||||
tags: [ desktop, mono ]
|
tags: [ desktop, mono ]
|
||||||
- name: give python3 cap_sys_ptrace
|
- name: give python3 cap_sys_ptrace
|
||||||
capabilities:
|
capabilities:
|
||||||
path: /usr/bin/python3.8
|
path: /usr/bin/python3.8
|
||||||
# Required for Randovania to access Dolphin memory
|
# Required for Randovania to access Dolphin memory
|
||||||
capability: cap_sys_ptrace=eip
|
capability: cap_sys_ptrace=eip
|
||||||
become: yes
|
|
||||||
tags: [ desktop, python, cap ]
|
tags: [ desktop, python, cap ]
|
||||||
roles:
|
roles:
|
||||||
- role: backup
|
- role: backup
|
||||||
@ -24,27 +22,20 @@
|
|||||||
backup_s3backup_tar_args_extra: h
|
backup_s3backup_tar_args_extra: h
|
||||||
backup_s3backup_list_extra:
|
backup_s3backup_list_extra:
|
||||||
- /home/salt/.backup/
|
- /home/salt/.backup/
|
||||||
become: yes
|
|
||||||
tags: [ backup ]
|
tags: [ backup ]
|
||||||
- role: motd
|
- role: motd
|
||||||
become: yes
|
|
||||||
tags: [ motd ]
|
tags: [ motd ]
|
||||||
- role: desktop
|
- role: desktop
|
||||||
become: yes
|
|
||||||
tags: [ desktop ]
|
tags: [ desktop ]
|
||||||
- role: grub
|
- role: grub
|
||||||
become: yes
|
|
||||||
tags: [ desktop, grub ]
|
tags: [ desktop, grub ]
|
||||||
- role: udev
|
- role: udev
|
||||||
vars:
|
vars:
|
||||||
udev_rules:
|
udev_rules:
|
||||||
# Switch RCM stuff
|
# Switch RCM stuff
|
||||||
- SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="plugdev"
|
- SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="plugdev"
|
||||||
become: yes
|
|
||||||
tags: [ desktop, udev ]
|
tags: [ desktop, udev ]
|
||||||
- role: pulseaudio
|
- role: pulseaudio
|
||||||
become: yes
|
|
||||||
tags: [ desktop, pulse, pulseaudio ]
|
tags: [ desktop, pulse, pulseaudio ]
|
||||||
- role: zerotier
|
- role: zerotier
|
||||||
become: yes
|
|
||||||
tags: [ desktop, zerotier ]
|
tags: [ desktop, zerotier ]
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
- /opt/minecraft/dammit/backups
|
- /opt/minecraft/dammit/backups
|
||||||
- /opt/minecraft/valhelsia/backups
|
- /opt/minecraft/valhelsia/backups
|
||||||
- /opt/minecraft/vanilla/backups
|
- /opt/minecraft/vanilla/backups
|
||||||
become: yes
|
|
||||||
tags: [ backup ]
|
tags: [ backup ]
|
||||||
- role: motd
|
- role: motd
|
||||||
vars:
|
vars:
|
||||||
@ -23,7 +22,6 @@
|
|||||||
- minecraft@dammit
|
- minecraft@dammit
|
||||||
- minecraft@valhelsia
|
- minecraft@valhelsia
|
||||||
- minecraft@vanilla
|
- minecraft@vanilla
|
||||||
become: yes
|
|
||||||
tags: [ motd ]
|
tags: [ motd ]
|
||||||
- role: minecraft
|
- role: minecraft
|
||||||
vars:
|
vars:
|
||||||
@ -49,7 +47,6 @@
|
|||||||
- "https://media.forgecdn.net/files/3113/275/industrial-foregoing-1.16.4-3.2.2-daea863.jar"
|
- "https://media.forgecdn.net/files/3113/275/industrial-foregoing-1.16.4-3.2.2-daea863.jar"
|
||||||
minecraft_forge_mods_remove:
|
minecraft_forge_mods_remove:
|
||||||
- industrial-foregoing-1.16.3-3.1.1-a834e76.jar
|
- industrial-foregoing-1.16.3-3.1.1-a834e76.jar
|
||||||
become: yes
|
|
||||||
tags: [ game, minecraft, forge, valhelsia ]
|
tags: [ game, minecraft, forge, valhelsia ]
|
||||||
- role: factorio
|
- role: factorio
|
||||||
vars:
|
vars:
|
||||||
@ -65,7 +62,6 @@
|
|||||||
public: false
|
public: false
|
||||||
lan: false
|
lan: false
|
||||||
admins: [ "rehashed_salt" ]
|
admins: [ "rehashed_salt" ]
|
||||||
become: yes
|
|
||||||
tags: [ game, factorio ]
|
tags: [ game, factorio ]
|
||||||
- hosts: game1.thefuck.how
|
- hosts: game1.thefuck.how
|
||||||
roles:
|
roles:
|
||||||
@ -88,7 +84,6 @@
|
|||||||
- opt: view-distance
|
- opt: view-distance
|
||||||
value: 12
|
value: 12
|
||||||
minecraft_paper_install: yes
|
minecraft_paper_install: yes
|
||||||
become: yes
|
|
||||||
tags: [ game, minecraft, paper, vanilla ]
|
tags: [ game, minecraft, paper, vanilla ]
|
||||||
- hosts: game1.thefuck.how
|
- hosts: game1.thefuck.how
|
||||||
roles:
|
roles:
|
||||||
@ -125,5 +120,4 @@
|
|||||||
- Stellar+API-0.1.3.8.jar
|
- Stellar+API-0.1.3.8.jar
|
||||||
- Stellar+Sky-0.1.5.7.jar
|
- Stellar+Sky-0.1.5.7.jar
|
||||||
- World-Tooltips-1.7.10-1.2.3-79.jar
|
- World-Tooltips-1.7.10-1.2.3-79.jar
|
||||||
become: yes
|
|
||||||
tags: [ game, minecraft, forge, dammit ]
|
tags: [ game, minecraft, forge, dammit ]
|
||||||
|
21
playbooks/vars/apache.yml
Normal file
21
playbooks/vars/apache.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# vim:ft=ansible:
|
||||||
|
apache_remove_default_vhost: yes
|
||||||
|
apache_packages_state: latest
|
||||||
|
apache_mods_enabled:
|
||||||
|
- headers.load
|
||||||
|
- http2.load
|
||||||
|
- mpm_worker.load
|
||||||
|
- proxy.load
|
||||||
|
- proxy_fcgi.load
|
||||||
|
- proxy_http.load
|
||||||
|
- rewrite.load
|
||||||
|
- ssl.load
|
||||||
|
apache_mods_disabled:
|
||||||
|
- mpm_prefork.load
|
||||||
|
- php7.4.load
|
||||||
|
apache_global_vhost_settings: |
|
||||||
|
DirectoryIndex index.php index.html
|
||||||
|
Protocols h2 http/1.1
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||||
|
</FilesMatch>
|
71
playbooks/vars/desultd-apache.yml
Normal file
71
playbooks/vars/desultd-apache.yml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# vim:ft=ansible:
|
||||||
|
apache_global_vhost_settings: |
|
||||||
|
DirectoryIndex index.php index.html
|
||||||
|
Protocols h2 http/1.1
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||||
|
</FilesMatch>
|
||||||
|
apache_vhosts:
|
||||||
|
# desu.ltd
|
||||||
|
- servername: desu.ltd
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://desu.ltd/
|
||||||
|
- servername: git.desu.ltd
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://git.desu.ltd/
|
||||||
|
- servername: nc.desu.ltd
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://nc.desu.ltd/
|
||||||
|
# 9iron.club
|
||||||
|
- servername: 9iron.club
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://www.9iron.club/
|
||||||
|
- servername: www.9iron.club
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://www.9iron.club/
|
||||||
|
apache_vhosts_ssl:
|
||||||
|
# desu.ltd
|
||||||
|
- servername: desu.ltd
|
||||||
|
documentroot: /var/www/desu.ltd
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
||||||
|
- servername: git.desu.ltd
|
||||||
|
extra_parameters: |
|
||||||
|
ProxyPreserveHost On
|
||||||
|
ProxyRequests Off
|
||||||
|
ProxyPass / http://127.0.0.1:3000/ nocanon retry=1
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
||||||
|
- servername: nc.desu.ltd
|
||||||
|
extra_parameters: |
|
||||||
|
Header always set Strict-Transport-Security "max-age=31536000"
|
||||||
|
documentroot: /var/www/nc.desu.ltd
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
||||||
|
# 9iron.club
|
||||||
|
- servername: 9iron.club
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://www.9iron.club/
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
||||||
|
- servername: www.9iron.club
|
||||||
|
documentroot: /var/www/www.9iron.club
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
||||||
|
# otwstudios.org
|
||||||
|
- servername: otwstudios.org
|
||||||
|
extra_parameters: |
|
||||||
|
Redirect permanent / https://www.otwstudios.org/
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
||||||
|
- servername: www.otwstudios.org
|
||||||
|
documentroot: /var/www/www.otwstudios.org
|
||||||
|
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
||||||
|
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
||||||
|
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
15
playbooks/vars/desultd-certbot.yml
Normal file
15
playbooks/vars/desultd-certbot.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# vim:ft=ansible:
|
||||||
|
certbot_admin_email: rehashedsalt@cock.li
|
||||||
|
certbot_create_if_missing: yes
|
||||||
|
certbot_create_method: standalone
|
||||||
|
certbot_create_standalone_stop_services:
|
||||||
|
- apache2
|
||||||
|
certbot_certs:
|
||||||
|
- domains:
|
||||||
|
- desu.ltd
|
||||||
|
- git.desu.ltd
|
||||||
|
- nc.desu.ltd
|
||||||
|
- web1.desu.ltd
|
||||||
|
- 9iron.club
|
||||||
|
- www.9iron.club
|
||||||
|
- otwstudios.org
|
20
playbooks/vars/desultd-nextcloud.yml
Normal file
20
playbooks/vars/desultd-nextcloud.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# vim:ft=ansible:
|
||||||
|
nextcloud_installation_dir: /var/www/nc.desu.ltd
|
||||||
|
nextcloud_data_dir: /srv/desu.ltd/nc
|
||||||
|
nextcloud_admin_user: admin
|
||||||
|
nextcloud_admin_pass: "{{ secret_nextcloud_admin_pass }}"
|
||||||
|
nextcloud_version: 19
|
||||||
|
nextcloud_urls:
|
||||||
|
- http://nc.desu.ltd:80
|
||||||
|
- https://nc.desu.ltd:443
|
||||||
|
nextcloud_config:
|
||||||
|
system:
|
||||||
|
trusted_domains:
|
||||||
|
"{{ nextcloud_urls | map('urlsplit', 'hostname') | list }}"
|
||||||
|
nextcloud_database:
|
||||||
|
backend: pgsql
|
||||||
|
name: nextcloud-desultd
|
||||||
|
user: nextcloud-desultd
|
||||||
|
pass: "{{ secret_nextcloud_db_pass }}"
|
||||||
|
host: 192.168.164.156
|
||||||
|
port: 5432
|
18
playbooks/vars/php-fpm.yml
Normal file
18
playbooks/vars/php-fpm.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
# vim:ft=ansible:
|
||||||
|
# Defaults for a simple php-fpm setup
|
||||||
|
php_enable_php_fpm: yes
|
||||||
|
php_memory_limit: 512M
|
||||||
|
php_packages_extra:
|
||||||
|
- libapache2-mod-php
|
||||||
|
- php-zip # For Nextcloud
|
||||||
|
- php-intl
|
||||||
|
- php-imagick
|
||||||
|
- php-redis
|
||||||
|
- php-bcmath
|
||||||
|
- php-gmp
|
||||||
|
- php-pgsql # For general DB stuff
|
||||||
|
# Nextcloud recommended opcache settings
|
||||||
|
php_opcache_max_accelerated_files: 10000
|
||||||
|
php_opcache_memory_consumption: 128
|
||||||
|
php_opcache_revalidate_freq: 2
|
@ -6,8 +6,13 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: configure nextcloud cronjob
|
- name: configure nextcloud cronjob
|
||||||
cron: user=www-data name=nextcloud minute=*/5 job="php -f /var/www/nc.desu.ltd/cron.php"
|
cron: user=www-data name=nextcloud minute=*/5 job="php -f /var/www/nc.desu.ltd/cron.php"
|
||||||
become: yes
|
|
||||||
tags: [ nextcloud, cron ]
|
tags: [ nextcloud, cron ]
|
||||||
|
vars_files:
|
||||||
|
- vars/apache.yml
|
||||||
|
- vars/php-fpm.yml
|
||||||
|
- vars/desultd-apache.yml
|
||||||
|
- vars/desultd-certbot.yml
|
||||||
|
- vars/desultd-nextcloud.yml
|
||||||
roles:
|
roles:
|
||||||
- role: backup
|
- role: backup
|
||||||
vars:
|
vars:
|
||||||
@ -18,16 +23,55 @@
|
|||||||
- /srv/desu.ltd
|
- /srv/desu.ltd
|
||||||
backup_s3backup_exclude_list_extra:
|
backup_s3backup_exclude_list_extra:
|
||||||
- /var/lib/gitea/log
|
- /var/lib/gitea/log
|
||||||
become: yes
|
|
||||||
tags: [ backup ]
|
tags: [ backup ]
|
||||||
- role: motd
|
- role: motd
|
||||||
become: yes
|
|
||||||
vars:
|
vars:
|
||||||
motd_watch_services_extra:
|
motd_watch_services_extra:
|
||||||
- apache2
|
- apache2
|
||||||
- gitea
|
- gitea
|
||||||
- php7.4-fpm
|
- php7.4-fpm
|
||||||
tags: [ motd ]
|
tags: [ motd ]
|
||||||
|
- role: certbot
|
||||||
|
tags: [ web, certbot ]
|
||||||
|
- role: php
|
||||||
|
tags: [ web, php ]
|
||||||
|
- role: apache
|
||||||
|
tags: [ web, apache ]
|
||||||
|
- role: git
|
||||||
|
vars:
|
||||||
|
git_repos:
|
||||||
|
- repo: https://git.desu.ltd/salt/desultd
|
||||||
|
dest: /var/www/desu.ltd
|
||||||
|
- repo: https://git.desu.ltd/salt/9iron
|
||||||
|
dest: /var/www/www.9iron.club
|
||||||
|
- repo: https://git.desu.ltd/salt/gitea-custom
|
||||||
|
dest: /usr/local/bin/custom
|
||||||
|
tags: [ web, git ]
|
||||||
|
- role: nextcloud
|
||||||
|
tags: [ web, nextcloud ]
|
||||||
|
- role: gitea
|
||||||
|
vars:
|
||||||
|
# Look and feel
|
||||||
|
gitea_app_name: "Git Desu"
|
||||||
|
# Core config
|
||||||
|
gitea_db_type: postgres
|
||||||
|
gitea_db_host: 192.168.164.156:5432
|
||||||
|
gitea_db_name: gitea-desultd
|
||||||
|
gitea_db_user: gitea-desultd
|
||||||
|
gitea_db_password: "{{ secret_gitea_db_pass }}"
|
||||||
|
gitea_http_domain: git.desu.ltd
|
||||||
|
gitea_oauth2_enabled: no
|
||||||
|
gitea_repository_root: /srv/desu.ltd/git
|
||||||
|
gitea_require_signin: no
|
||||||
|
gitea_root_url: https://git.desu.ltd
|
||||||
|
gitea_shell: "/bin/bash"
|
||||||
|
gitea_ssh_domain: git.desu.ltd
|
||||||
|
gitea_ssh_port: 22
|
||||||
|
gitea_start_ssh: no
|
||||||
|
gitea_user: git
|
||||||
|
tags: [ web, gitea ]
|
||||||
|
- hosts: game1.thefuck.how
|
||||||
|
roles:
|
||||||
- role: certbot
|
- role: certbot
|
||||||
vars:
|
vars:
|
||||||
certbot_admin_email: rehashedsalt@cock.li
|
certbot_admin_email: rehashedsalt@cock.li
|
||||||
@ -37,14 +81,8 @@
|
|||||||
- apache2
|
- apache2
|
||||||
certbot_certs:
|
certbot_certs:
|
||||||
- domains:
|
- domains:
|
||||||
- desu.ltd
|
- thefuck.how
|
||||||
- git.desu.ltd
|
- game1.thefuck.how
|
||||||
- nc.desu.ltd
|
|
||||||
- web1.desu.ltd
|
|
||||||
- 9iron.club
|
|
||||||
- www.9iron.club
|
|
||||||
- otwstudios.org
|
|
||||||
become: yes
|
|
||||||
tags: [ web, certbot ]
|
tags: [ web, certbot ]
|
||||||
- role: php
|
- role: php
|
||||||
vars:
|
vars:
|
||||||
@ -52,18 +90,11 @@
|
|||||||
php_memory_limit: 512M
|
php_memory_limit: 512M
|
||||||
php_packages_extra:
|
php_packages_extra:
|
||||||
- libapache2-mod-php
|
- libapache2-mod-php
|
||||||
- php-zip # For Nextcloud
|
|
||||||
- php-intl
|
- php-intl
|
||||||
- php-imagick
|
- php-imagick
|
||||||
- php-redis
|
- php-redis
|
||||||
- php-bcmath
|
- php-bcmath
|
||||||
- php-gmp
|
- php-gmp
|
||||||
- php-pgsql # For general DB stuff
|
|
||||||
# Nextcloud recommended opcache settings
|
|
||||||
php_opcache_max_accelerated_files: 10000
|
|
||||||
php_opcache_memory_consumption: 128
|
|
||||||
php_opcache_revalidate_freq: 2
|
|
||||||
become: yes
|
|
||||||
tags: [ web, php ]
|
tags: [ web, php ]
|
||||||
- role: apache
|
- role: apache
|
||||||
vars:
|
vars:
|
||||||
@ -88,124 +119,28 @@
|
|||||||
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
apache_vhosts:
|
apache_vhosts:
|
||||||
# desu.ltd
|
- servername: thefuck.how
|
||||||
- servername: desu.ltd
|
|
||||||
extra_parameters: |
|
extra_parameters: |
|
||||||
Redirect permanent / https://desu.ltd/
|
Redirect permanent / https://thefuck.how/
|
||||||
- servername: git.desu.ltd
|
- servername: game1.thefuck.how
|
||||||
extra_parameters: |
|
extra_parameters: |
|
||||||
Redirect permanent / https://git.desu.ltd/
|
Redirect permanent / https://thefuck.how/
|
||||||
- servername: nc.desu.ltd
|
|
||||||
extra_parameters: |
|
|
||||||
Redirect permanent / https://nc.desu.ltd/
|
|
||||||
# 9iron.club
|
|
||||||
- servername: 9iron.club
|
|
||||||
extra_parameters: |
|
|
||||||
Redirect permanent / https://www.9iron.club/
|
|
||||||
- servername: www.9iron.club
|
|
||||||
extra_parameters: |
|
|
||||||
Redirect permanent / https://www.9iron.club/
|
|
||||||
apache_vhosts_ssl:
|
apache_vhosts_ssl:
|
||||||
# desu.ltd
|
- servername: thefuck.how
|
||||||
- servername: desu.ltd
|
documentroot: /var/www/thefuck.how
|
||||||
documentroot: /var/www/desu.ltd
|
certificate_file: /etc/letsencrypt/live/thefuck.how/fullchain.pem
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
certificate_key_file: /etc/letsencrypt/live/thefuck.how/privkey.pem
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
certificate_chain_file: /etc/letsencrypt/live/thefuck.how/chain.pem
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
- servername: game1.thefuck.how
|
||||||
- servername: git.desu.ltd
|
|
||||||
extra_parameters: |
|
extra_parameters: |
|
||||||
ProxyPreserveHost On
|
Redirect permanent / https://thefuck.how/
|
||||||
ProxyRequests Off
|
certificate_file: /etc/letsencrypt/live/thefuck.how/fullchain.pem
|
||||||
ProxyPass / http://127.0.0.1:3000/ nocanon retry=1
|
certificate_key_file: /etc/letsencrypt/live/thefuck.how/privkey.pem
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
certificate_chain_file: /etc/letsencrypt/live/thefuck.how/chain.pem
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
|
||||||
- servername: nc.desu.ltd
|
|
||||||
extra_parameters: |
|
|
||||||
Header always set Strict-Transport-Security "max-age=31536000"
|
|
||||||
documentroot: /var/www/nc.desu.ltd
|
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
|
||||||
# 9iron.club
|
|
||||||
- servername: 9iron.club
|
|
||||||
extra_parameters: |
|
|
||||||
Redirect permanent / https://www.9iron.club/
|
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
|
||||||
- servername: www.9iron.club
|
|
||||||
documentroot: /var/www/www.9iron.club
|
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
|
||||||
# otwstudios.org
|
|
||||||
- servername: otwstudios.org
|
|
||||||
extra_parameters: |
|
|
||||||
Redirect permanent / https://www.otwstudios.org/
|
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
|
||||||
- servername: www.otwstudios.org
|
|
||||||
documentroot: /var/www/www.otwstudios.org
|
|
||||||
certificate_file: /etc/letsencrypt/live/desu.ltd/fullchain.pem
|
|
||||||
certificate_key_file: /etc/letsencrypt/live/desu.ltd/privkey.pem
|
|
||||||
certificate_chain_file: /etc/letsencrypt/live/desu.ltd/chain.pem
|
|
||||||
become: yes
|
|
||||||
tags: [ web, apache ]
|
tags: [ web, apache ]
|
||||||
- role: git
|
- role: git
|
||||||
vars:
|
vars:
|
||||||
git_repos:
|
git_repos:
|
||||||
- repo: https://git.desu.ltd/salt/desultd
|
- repo: https://git.desu.ltd/salt/thefuckhow
|
||||||
dest: /var/www/desu.ltd
|
dest: /var/www/thefuck.how
|
||||||
- repo: https://git.desu.ltd/salt/9iron
|
|
||||||
dest: /var/www/www.9iron.club
|
|
||||||
- repo: https://git.desu.ltd/salt/gitea-custom
|
|
||||||
dest: /usr/local/bin/custom
|
|
||||||
become: yes
|
|
||||||
tags: [ web, git ]
|
tags: [ web, git ]
|
||||||
- role: nextcloud
|
|
||||||
vars:
|
|
||||||
nextcloud_installation_dir: /var/www/nc.desu.ltd
|
|
||||||
nextcloud_data_dir: /srv/desu.ltd/nc
|
|
||||||
nextcloud_admin_user: admin
|
|
||||||
nextcloud_admin_pass: "{{ secret_nextcloud_admin_pass }}"
|
|
||||||
nextcloud_version: 19
|
|
||||||
nextcloud_urls:
|
|
||||||
- http://nc.desu.ltd:80
|
|
||||||
- https://nc.desu.ltd:443
|
|
||||||
nextcloud_config:
|
|
||||||
system:
|
|
||||||
trusted_domains:
|
|
||||||
"{{ nextcloud_urls | map('urlsplit', 'hostname') | list }}"
|
|
||||||
nextcloud_database:
|
|
||||||
backend: pgsql
|
|
||||||
name: nextcloud-desultd
|
|
||||||
user: nextcloud-desultd
|
|
||||||
pass: "{{ secret_nextcloud_db_pass }}"
|
|
||||||
host: 192.168.164.156
|
|
||||||
port: 5432
|
|
||||||
become: yes
|
|
||||||
tags: [ web, nextcloud ]
|
|
||||||
- role: gitea
|
|
||||||
vars:
|
|
||||||
# Look and feel
|
|
||||||
gitea_app_name: "Git Desu"
|
|
||||||
# Core config
|
|
||||||
gitea_db_type: postgres
|
|
||||||
gitea_db_host: 192.168.164.156:5432
|
|
||||||
gitea_db_name: gitea-desultd
|
|
||||||
gitea_db_user: gitea-desultd
|
|
||||||
gitea_db_password: "{{ secret_gitea_db_pass }}"
|
|
||||||
gitea_http_domain: git.desu.ltd
|
|
||||||
gitea_oauth2_enabled: no
|
|
||||||
gitea_repository_root: /srv/desu.ltd/git
|
|
||||||
gitea_require_signin: no
|
|
||||||
gitea_root_url: https://git.desu.ltd
|
|
||||||
gitea_shell: "/bin/bash"
|
|
||||||
gitea_ssh_domain: git.desu.ltd
|
|
||||||
gitea_ssh_port: 22
|
|
||||||
gitea_start_ssh: no
|
|
||||||
gitea_user: git
|
|
||||||
become: yes
|
|
||||||
tags: [ web, gitea ]
|
|
||||||
|
2
site.yml
2
site.yml
@ -5,10 +5,8 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- role: common
|
- role: common
|
||||||
become: yes
|
|
||||||
tags: [ common ]
|
tags: [ common ]
|
||||||
- role: ansible-pull
|
- role: ansible-pull
|
||||||
become: yes
|
|
||||||
tags: [ ansible, common ]
|
tags: [ ansible, common ]
|
||||||
# Import specific playbooks
|
# Import specific playbooks
|
||||||
- import_playbook: playbooks/db.yml
|
- import_playbook: playbooks/db.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user