32 lines
1017 B
YAML
32 lines
1017 B
YAML
---
|
|
|
|
- name: Install dependencies
|
|
apt: name={{ item }}
|
|
with_items:
|
|
- php7.0-fpm
|
|
- php7.0-ldap
|
|
- php7.0-sqlite3
|
|
- php7.0-xml
|
|
|
|
- name: Create vhost directory
|
|
file: path=/var/www/partdb state=directory owner=www-data group=www-data
|
|
|
|
- name: Ensure partdb certificates are available
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/partdb.binary-kitchen.de.key -out /etc/nginx/ssl/partdb.binary-kitchen.de.crt -days 730 -subj "/CN=partdb.binary-kitchen.de" creates=/etc/nginx/ssl/partdb.binary-kitchen.de.crt
|
|
notify: Restart nginx
|
|
|
|
- name: Configure certificate manager
|
|
copy: src=certs dest=/etc/acertmgr/partdb.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 php7.0-fpm
|
|
service: name=php7.0-fpm state=started enabled=yes
|