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