2020-12-21 01:18:32 -06:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
# Webservers
|
|
|
|
---
|
|
|
|
- hosts: web1.desu.ltd
|
2020-12-31 20:11:09 -06:00
|
|
|
tasks:
|
|
|
|
- name: configure nextcloud cronjob
|
2020-12-31 22:23:26 -06:00
|
|
|
cron: user=www-data name=nextcloud minute=*/5 job="php -f /var/www/nc.desu.ltd/cron.php"
|
2020-12-31 20:11:09 -06:00
|
|
|
tags: [ nextcloud, cron ]
|
2021-01-18 05:03:46 -06:00
|
|
|
vars_files:
|
|
|
|
- vars/apache.yml
|
|
|
|
- vars/php-fpm.yml
|
|
|
|
- vars/desultd-apache.yml
|
|
|
|
- vars/desultd-certbot.yml
|
2021-01-18 06:17:54 -06:00
|
|
|
- vars/desultd-gitea.yml
|
2021-01-18 05:03:46 -06:00
|
|
|
- vars/desultd-nextcloud.yml
|
2020-12-21 01:18:32 -06:00
|
|
|
roles:
|
2020-12-24 09:19:12 -06:00
|
|
|
- role: backup
|
|
|
|
vars:
|
|
|
|
backup_s3backup_list_extra:
|
|
|
|
- /var/lib/gitea
|
2020-12-30 15:32:44 -06:00
|
|
|
- /var/www/nc.desu.ltd
|
2020-12-30 15:31:44 -06:00
|
|
|
- /var/www/www.9iron.club/files
|
2020-12-30 18:05:57 -06:00
|
|
|
- /srv/desu.ltd
|
2021-01-14 18:06:13 -06:00
|
|
|
backup_s3backup_exclude_list_extra:
|
|
|
|
- /var/lib/gitea/log
|
2020-12-24 09:19:12 -06:00
|
|
|
tags: [ backup ]
|
2021-01-17 00:53:48 -06:00
|
|
|
- role: motd
|
|
|
|
vars:
|
|
|
|
motd_watch_services_extra:
|
|
|
|
- apache2
|
|
|
|
- gitea
|
|
|
|
- php7.4-fpm
|
|
|
|
tags: [ motd ]
|
2021-01-18 05:03:46 -06:00
|
|
|
- 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
|
|
|
|
tags: [ web, gitea ]
|
2021-01-18 06:16:49 -06:00
|
|
|
- hosts: web1.9iron.club
|
|
|
|
tasks:
|
|
|
|
- name: configure nextcloud cronjob
|
|
|
|
cron: user=www-data name=nextcloud minute=*/5 job="php -f /var/www/nextcloud/cron.php"
|
|
|
|
tags: [ nextcloud, cron ]
|
|
|
|
- name: mount nextcloud efs
|
2021-01-26 06:15:03 -06:00
|
|
|
mount: path=/var/nextcloud src=fs-03dc657b.efs.us-east-2.amazonaws.com:/ fstype=nfs4 opts="nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport" state=mounted
|
2021-01-18 06:16:49 -06:00
|
|
|
tags: [ nextcloud, efs ]
|
|
|
|
- name: mount gitea efs
|
2021-01-26 06:15:03 -06:00
|
|
|
mount: path=/var/gitea src=fs-b5d56ccd.efs.us-east-2.amazonaws.com:/ fstype=nfs4 opts="nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport" state=mounted
|
2021-01-18 06:16:49 -06:00
|
|
|
tags: [ gitea, efs ]
|
|
|
|
vars_files:
|
|
|
|
- vars/apache.yml
|
|
|
|
- vars/php-fpm.yml
|
|
|
|
- vars/9iron-apache.yml
|
|
|
|
- vars/9iron-certbot.yml
|
2021-01-18 06:24:32 -06:00
|
|
|
- vars/9iron-gitea.yml
|
2021-01-18 06:16:49 -06:00
|
|
|
roles:
|
|
|
|
- role: backup
|
|
|
|
vars:
|
|
|
|
backup_s3backup_list_extra:
|
|
|
|
- /var/gitea
|
|
|
|
- /var/lib/gitea
|
|
|
|
- /var/nextcloud
|
|
|
|
- /var/www/nextcloud
|
|
|
|
backup_s3backup_exclude_list_extra:
|
|
|
|
- /var/lib/gitea/log
|
|
|
|
tags: [ backup ]
|
|
|
|
- role: motd
|
|
|
|
vars:
|
|
|
|
motd_watch_services_extra:
|
|
|
|
- apache2
|
|
|
|
- gitea
|
|
|
|
- php7.4-fpm
|
|
|
|
tags: [ motd ]
|
2021-01-26 04:25:27 -06:00
|
|
|
- role: gitea
|
|
|
|
tags: [ web, gitea ]
|
2021-01-18 06:16:49 -06:00
|
|
|
- role: php
|
|
|
|
tags: [ web, php ]
|
|
|
|
- role: apache
|
|
|
|
tags: [ web, apache ]
|
2021-01-26 04:25:27 -06:00
|
|
|
- role: certbot
|
|
|
|
tags: [ web, certbot ]
|
|
|
|
- hosts: web2.desu.ltd
|
2021-01-25 22:19:31 -06:00
|
|
|
vars_files:
|
|
|
|
- vars/apache.yml
|
2021-01-26 04:25:27 -06:00
|
|
|
- vars/desultd-pleroma.yml
|
|
|
|
- vars/desultd-pleroma-apache.yml
|
|
|
|
- vars/desultd-pleroma-certbot.yml
|
2021-01-25 22:19:31 -06:00
|
|
|
roles:
|
|
|
|
- role: backup
|
|
|
|
vars:
|
|
|
|
backup_s3backup_list_extra:
|
|
|
|
- /opt/pleroma
|
2021-01-25 22:59:43 -06:00
|
|
|
- /var/lib/matrix-synapse
|
2021-01-25 22:19:31 -06:00
|
|
|
- /var/lib/pleroma
|
|
|
|
tags: [ backup ]
|
|
|
|
- role: motd
|
|
|
|
vars:
|
|
|
|
motd_watch_services_extra:
|
|
|
|
- apache2
|
|
|
|
- pleroma
|
|
|
|
tags: [ motd ]
|
2021-01-26 04:25:27 -06:00
|
|
|
- role: pleroma
|
|
|
|
tags: [ web, pleroma ]
|
|
|
|
- role: apache
|
|
|
|
tags: [ web, apache ]
|
2021-01-25 22:19:31 -06:00
|
|
|
- role: certbot
|
|
|
|
tags: [ web, certbot ]
|
2021-01-18 05:03:46 -06:00
|
|
|
- hosts: game1.thefuck.how
|
2021-01-25 22:19:31 -06:00
|
|
|
vars_files:
|
|
|
|
- vars/apache.yml
|
|
|
|
- vars/php-fpm.yml
|
2021-01-18 05:03:46 -06:00
|
|
|
roles:
|
2020-12-30 16:37:22 -06:00
|
|
|
- role: certbot
|
|
|
|
vars:
|
|
|
|
certbot_admin_email: rehashedsalt@cock.li
|
|
|
|
certbot_create_if_missing: yes
|
|
|
|
certbot_create_method: standalone
|
|
|
|
certbot_create_standalone_stop_services:
|
|
|
|
- apache2
|
|
|
|
certbot_certs:
|
|
|
|
- domains:
|
2021-01-18 05:03:46 -06:00
|
|
|
- thefuck.how
|
|
|
|
- game1.thefuck.how
|
2020-12-30 16:37:22 -06:00
|
|
|
tags: [ web, certbot ]
|
|
|
|
- role: php
|
|
|
|
tags: [ web, php ]
|
2020-12-21 01:18:32 -06:00
|
|
|
- role: apache
|
|
|
|
vars:
|
|
|
|
apache_vhosts:
|
2021-01-18 05:03:46 -06:00
|
|
|
- servername: thefuck.how
|
2020-12-31 21:34:04 -06:00
|
|
|
extra_parameters: |
|
2021-01-18 05:03:46 -06:00
|
|
|
Redirect permanent / https://thefuck.how/
|
|
|
|
- servername: game1.thefuck.how
|
2020-12-30 15:31:44 -06:00
|
|
|
extra_parameters: |
|
2021-01-18 05:03:46 -06:00
|
|
|
Redirect permanent / https://thefuck.how/
|
2020-12-21 01:18:32 -06:00
|
|
|
apache_vhosts_ssl:
|
2021-01-18 05:03:46 -06:00
|
|
|
- servername: thefuck.how
|
|
|
|
documentroot: /var/www/thefuck.how
|
|
|
|
certificate_file: /etc/letsencrypt/live/thefuck.how/fullchain.pem
|
|
|
|
certificate_key_file: /etc/letsencrypt/live/thefuck.how/privkey.pem
|
|
|
|
certificate_chain_file: /etc/letsencrypt/live/thefuck.how/chain.pem
|
|
|
|
- servername: game1.thefuck.how
|
2020-12-30 15:31:44 -06:00
|
|
|
extra_parameters: |
|
2021-01-18 05:03:46 -06:00
|
|
|
Redirect permanent / https://thefuck.how/
|
|
|
|
certificate_file: /etc/letsencrypt/live/thefuck.how/fullchain.pem
|
|
|
|
certificate_key_file: /etc/letsencrypt/live/thefuck.how/privkey.pem
|
|
|
|
certificate_chain_file: /etc/letsencrypt/live/thefuck.how/chain.pem
|
2020-12-21 01:18:32 -06:00
|
|
|
tags: [ web, apache ]
|
|
|
|
- role: git
|
|
|
|
vars:
|
|
|
|
git_repos:
|
2021-01-18 05:03:46 -06:00
|
|
|
- repo: https://git.desu.ltd/salt/thefuckhow
|
|
|
|
dest: /var/www/thefuck.how
|
2020-12-21 01:18:32 -06:00
|
|
|
tags: [ web, git ]
|