29 lines
930 B
YAML
29 lines
930 B
YAML
---
|
|
|
|
- name: Install dependencies
|
|
apt:
|
|
name:
|
|
- php-fpm
|
|
|
|
- name: Create vhost directory
|
|
file: path=/var/www/eh2x state=directory owner=www-data group=www-data
|
|
|
|
- name: Ensure certificates are available
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/eh2x.binary-kitchen.de.key -out /etc/nginx/ssl/eh2x.binary-kitchen.de.crt -days 730 -subj "/CN=eh2x.binary-kitchen.de" creates=/etc/nginx/ssl/eh2x.binary-kitchen.de.crt
|
|
notify: Restart nginx
|
|
|
|
#- name: Configure certificate manager
|
|
# copy: src=certs dest=/etc/acertmgr/eh2x.binary-kitchen.de.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
|