Migrate domains, reorganize websites so that they actually leverage sites-available and sites-enabled
This commit is contained in:
parent
968ca2eeaf
commit
8cc6688469
12
ec2.yml
12
ec2.yml
@ -10,7 +10,7 @@
|
||||
mcname: "botaniapack-1"
|
||||
mczip: "https://www.assburgers.club/files/botaniapack-1.zip"
|
||||
mcforge: "1.10.2-12.18.3.2511"
|
||||
mcmotd: "First time on Assburgers edition"
|
||||
mcmotd: "First time on 9iron edition"
|
||||
roles:
|
||||
- minecraft
|
||||
- hosts: tag_ansiblehost_true
|
||||
@ -32,18 +32,18 @@
|
||||
roles:
|
||||
- role: redirect
|
||||
vars:
|
||||
redirect_from: "assburgers.club"
|
||||
redirect_to: "www.assburgers.club"
|
||||
redirect_from: "9iron.club"
|
||||
redirect_to: "www.9iron.club"
|
||||
redirect_webroot: "/var/www/redirect"
|
||||
- role: gitweb
|
||||
vars:
|
||||
gitweb_repo: "https://gitlab.com/rehashedsalt/www"
|
||||
gitweb_url: "www.assburgers.club"
|
||||
gitweb_url: "www.9iron.club"
|
||||
gitweb_webroot: "/var/www/www"
|
||||
- role: dokuwiki
|
||||
vars:
|
||||
dokuwiki_tgz: "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz"
|
||||
dokuwiki_url: "wiki.assburgers.club"
|
||||
dokuwiki_url: "wiki.9iron.club"
|
||||
dokuwiki_webroot: "/var/www/dokuwiki"
|
||||
- role: nextcloud
|
||||
vars:
|
||||
@ -55,5 +55,5 @@
|
||||
3332313764623133630a393731613236373837316437653265636663666261383135636662373566
|
||||
61373135303632336237333836353764646639633735323566346366623766646266
|
||||
nextcloud_tarbz2: "https://download.nextcloud.com/server/releases/nextcloud-18.0.0.tar.bz2"
|
||||
nextcloud_url: "nc.assburgers.club"
|
||||
nextcloud_url: "nc.9iron.club"
|
||||
nextcloud_webroot: "/var/www/nextcloud"
|
||||
|
@ -43,7 +43,12 @@
|
||||
- name: Copy over virtual host configs
|
||||
template:
|
||||
src: apache2-vhost-ssl.conf
|
||||
dest: "/etc/apache2/sites-enabled/{{ dokuwiki_url }}.conf"
|
||||
dest: "/etc/apache2/sites-available/{{ dokuwiki_url }}.conf"
|
||||
notify: restart apache
|
||||
- name: Enable config
|
||||
command:
|
||||
cmd: "a2ensite {{ dokuwiki_url }}.conf"
|
||||
creates: "/etc/apache2/sites-enabled/{{ dokuwiki_url }}.conf"
|
||||
notify: restart apache
|
||||
- name: Generate certificate
|
||||
include_role:
|
||||
|
@ -18,7 +18,12 @@
|
||||
- name: Copy over virtual host configs
|
||||
template:
|
||||
src: apache2-vhost-ssl.conf
|
||||
dest: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf"
|
||||
dest: "/etc/apache2/sites-available/{{ gitweb_url }}.conf"
|
||||
notify: restart apache
|
||||
- name: Enable config
|
||||
command:
|
||||
cmd: "a2ensite {{ gitweb_url }}.conf"
|
||||
creates: "/etc/apache2/sites-enabled/{{ gitweb_url }}.conf"
|
||||
notify: restart apache
|
||||
- name: Generate certificate
|
||||
include_role:
|
||||
|
@ -47,10 +47,10 @@
|
||||
block:
|
||||
- name: Fulfill challenge
|
||||
block:
|
||||
- name: Back up website config
|
||||
command: "mv /etc/apache2/sites-enabled/{{ website_url }}.conf /etc/apache2/sites-available/{{ website_url }}.conf"
|
||||
args:
|
||||
creates: "/etc/apache2/sites-available/{{ website_url }}.conf"
|
||||
- name: Disable website
|
||||
command:
|
||||
cmd: "a2dissite {{ website_url }}.conf"
|
||||
removes: "/etc/apache2/sites-enabled/{{ website_url }}.conf"
|
||||
- name: Create temporary config
|
||||
template:
|
||||
src: apache2-vhost.conf
|
||||
@ -101,8 +101,8 @@
|
||||
path: "/etc/apache2/sites-enabled/{{ website_url }}.conf"
|
||||
state: absent
|
||||
- name: Restore original config
|
||||
command: "/usr/bin/mv /etc/apache2/sites-available/{{ website_url }}.conf /etc/apache2/sites-enabled/{{ website_url }}.conf"
|
||||
args:
|
||||
command:
|
||||
cmd: "a2ensite {{ website_url }}.conf"
|
||||
creates: "/etc/apache2/sites-enabled/{{ website_url }}.conf"
|
||||
when: com_challenge['challenge_data']|length > 0
|
||||
- name: Reload Apache
|
||||
|
@ -79,7 +79,12 @@
|
||||
- name: Copy over virtual host configs
|
||||
template:
|
||||
src: apache2-vhost-ssl.conf
|
||||
dest: "/etc/apache2/sites-enabled/{{ nextcloud_url }}.conf"
|
||||
dest: "/etc/apache2/sites-available/{{ nextcloud_url }}.conf"
|
||||
notify: restart apache
|
||||
- name: Enable config
|
||||
command:
|
||||
cmd: "a2ensite {{ nextcloud_url }}.conf"
|
||||
creates: "/etc/apache2/sites-enabled/{{ nextcloud_url }}.conf"
|
||||
notify: restart apache
|
||||
- name: Generate certificate
|
||||
include_role:
|
||||
|
@ -6,7 +6,12 @@
|
||||
- name: Copy over redirect config
|
||||
template:
|
||||
src: apache2-redirect.conf
|
||||
dest: "/etc/apache2/sites-enabled/{{ redirect_from }}.conf"
|
||||
dest: "/etc/apache2/sites-available/{{ redirect_from }}.conf"
|
||||
notify: restart apache
|
||||
- name: Enable config
|
||||
command:
|
||||
cmd: "a2ensite {{ redirect_from }}.conf"
|
||||
creates: "/etc/apache2/sites-enabled/{{ redirect_from }}.conf"
|
||||
notify: restart apache
|
||||
- name: Generate certificate
|
||||
include_role:
|
||||
|
Loading…
Reference in New Issue
Block a user