2016-04-07 15:50:58 +02:00
|
|
|
---
|
|
|
|
|
2016-04-07 20:51:56 +02:00
|
|
|
- name: Install dependencies
|
2017-07-02 22:17:32 +02:00
|
|
|
apt: name={{ item }}
|
2016-04-07 20:51:56 +02:00
|
|
|
with_items:
|
2017-07-03 09:49:18 +02:00
|
|
|
- php7.0-fpm
|
|
|
|
- php7.0-ldap
|
|
|
|
- php7.0-sqlite3
|
2017-09-03 14:37:23 +02:00
|
|
|
- php7.0-xml
|
2016-04-07 15:50:58 +02:00
|
|
|
|
|
|
|
- name: Create vhost directory
|
|
|
|
file: path=/var/www/kitchen state=directory owner=www-data group=www-data
|
|
|
|
|
2016-05-09 20:33:49 +02:00
|
|
|
- name: Ensure (BK) certificates are available
|
2016-04-07 15:50:58 +02:00
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/www.binary-kitchen.de.key -out /etc/nginx/ssl/www.binary-kitchen.de.crt -days 730 -subj "/CN=www.binary-kitchen.de" creates=/etc/nginx/ssl/www.binary-kitchen.de.crt
|
|
|
|
notify: Restart nginx
|
|
|
|
|
2016-05-09 20:33:49 +02:00
|
|
|
- name: Ensure (CCC-R) certificates are available
|
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/www.ccc-r.de.key -out /etc/nginx/ssl/www.ccc-r.de.crt -days 730 -subj "/CN=www.ccc-r.de" creates=/etc/nginx/ssl/www.ccc-r.de.crt
|
|
|
|
notify: Restart nginx
|
|
|
|
|
2016-04-07 15:50:58 +02:00
|
|
|
- name: Configure certificate manager
|
|
|
|
copy: src=certs dest=/etc/acme/domains.d/www.binary-kitchen.de.conf
|
2017-02-28 14:14:33 +01:00
|
|
|
notify: Run certmgr
|
2016-04-07 15:50:58 +02:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2017-07-03 09:49:18 +02:00
|
|
|
- name: Start php7.0-fpm
|
|
|
|
service: name=php7.0-fpm state=started enabled=yes
|