ansible-thunix/roles/webserver/tasks/apache.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

2020-06-03 09:53:38 +00:00
# Configure apache2
2018-12-21 14:50:46 +00:00
---
2020-06-03 09:53:38 +00:00
# Certbot
2019-01-29 23:47:02 +00:00
- name: Add certbot cron job
copy:
src: ../files/etc/cron.weekly/certbot-renew
dest: /etc/cron.weekly/certbot-renew
2019-01-29 23:47:02 +00:00
owner: root
2020-06-03 09:53:38 +00:00
mode: 755
# Sites
- name: Deploy Apache2 site configs
copy:
src: ../files/etc/apache2/sites-available/{{ item }}.conf
dest: /etc/apache2/sites-available/{{ item }}.conf
loop:
2021-12-26 11:13:00 +00:00
- 000-default
2020-06-03 09:53:38 +00:00
- thunix.net
- www.thunix.net
- ftp.thunix.net
- staticadventures.netlib.re
- deb.thunix.net
- rpm.thunix.net
- stats.thunix.net
- wiki.thunix.net
- mightywcms
2021-09-30 16:05:47 +00:00
- apogee.thunix.net
2022-03-22 11:43:07 +00:00
- pcworms.ir
2020-06-03 09:53:38 +00:00
- name: Make Apache2 site configs live
file:
src: /etc/apache2/sites-available/{{ item }}.conf
dest: /etc/apache2/sites-enabled/{{ item }}.conf
state: link
loop:
2021-12-26 11:13:00 +00:00
- 000-default
2020-06-03 09:53:38 +00:00
- thunix.net
- www.thunix.net
- ftp.thunix.net
- staticadventures.netlib.re
- deb.thunix.net
- rpm.thunix.net
- stats.thunix.net
- wiki.thunix.net
- mightywcms
2021-09-30 16:05:47 +00:00
- apogee.thunix.net
2022-03-22 11:43:07 +00:00
- pcworms.ir
2019-03-26 23:41:03 +00:00
- name: Give permissions for staticadventures.netlib.re to southerntofu
file:
path: /var/www/staticadventures.netlib.re
state: directory
owner: southerntofu
group: southerntofu
2020-04-24 16:10:30 +00:00
recurse: yes # Can be removed in the future, but for now all files still have old uid/gid