ansible/roles/event_web/tasks/main.yml

32 lines
1013 B
YAML
Raw Permalink 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
2023-11-15 17:15:12 +01:00
- name: Create vhost directory
file: path=/var/www/engel 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