1
0
forked from infra/ansible
infra/roles/event_web/tasks/main.yml

29 lines
907 B
YAML
Raw Normal View History

---
- name: Install dependencies
apt:
name:
- php-fpm
- name: Create vhost directory
2023-11-14 16:49:27 +01:00
file: path=/var/www/eh21 state=directory owner=www-data group=www-data
- name: Ensure certificates are available
2023-11-14 16:49:27 +01:00
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/eh21.easterhegg.eu.key -out /etc/nginx/ssl/eh21.easterhegg.eu.crt -days 730 -subj "/CN=eh21.easterhegg.eu" creates=/etc/nginx/ssl/eh21.easterhegg.eu.crt
notify: Restart nginx
2023-11-14 16:49:27 +01:00
- name: Configure certificate manager
copy: src=certs dest=/etc/acertmgr/eh21.easterhegg.eu.conf
notify: Run acertmgr
- name: Configure vhosts
copy: src=vhost dest=/etc/nginx/sites-available/www
notify: Restart nginx
- name: Enable vhosts
file: src=/etc/nginx/sites-available/www dest=/etc/nginx/sites-enabled/www state=link
notify: Restart nginx
- name: Start php8.2-fpm
service: name=php8.2-fpm state=started enabled=yes