2016-04-07 15:50:58 +02:00
|
|
|
---
|
|
|
|
|
2016-04-07 20:51:56 +02:00
|
|
|
- name: Install dependencies
|
2020-11-13 18:26:10 +01:00
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- php-fpm
|
|
|
|
- php-ldap
|
|
|
|
- php-sqlite3
|
|
|
|
- php-xml
|
2024-05-17 22:32:51 +02:00
|
|
|
- python3-passlib
|
2016-04-07 15:50:58 +02:00
|
|
|
|
2024-04-17 19:13:19 +02:00
|
|
|
- name: Create vhost directories
|
|
|
|
file: path=/var/www/{{ item }} state=directory owner=www-data group=www-data
|
|
|
|
with_items:
|
|
|
|
- autoconfig
|
|
|
|
- autoconfig/mail
|
|
|
|
- ccc-r
|
|
|
|
- makerspace-regensburg
|
|
|
|
- kitchen
|
2016-04-07 15:50:58 +02:00
|
|
|
|
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
|
|
|
|
|
2024-04-17 19:13:19 +02:00
|
|
|
- name: Ensure (BK autodiscover) certificates are available
|
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/autoconfig.binary-kitchen.de.key -out /etc/nginx/ssl/autoconfig.binary-kitchen.de.crt -days 730 -subj "/CN=autoconfig.binary-kitchen.de" creates=/etc/nginx/ssl/autoconfig.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
|
|
|
|
|
2018-10-02 18:35:30 +02:00
|
|
|
- name: Ensure (MS-R) certificates are available
|
|
|
|
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/www.makerspace-regensburg.de.key -out /etc/nginx/ssl/www.makerspace-regensburg.de.crt -days 730 -subj "/CN=www.makerspace-regensburg.de" creates=/etc/nginx/ssl/www.makerspace-regensburg.de.crt
|
|
|
|
notify: Restart nginx
|
|
|
|
|
2024-04-17 19:13:19 +02:00
|
|
|
- name: Place Thunderbird autoconfig file
|
|
|
|
template: src=auto_mail.xml.j2 dest=/var/www/autoconfig/mail/config-v1.1.xml
|
|
|
|
|
2024-05-17 22:32:51 +02:00
|
|
|
- name: Configure php-fpm
|
|
|
|
copy: src={{ item }} dest=/etc/php/8.2/fpm/pool.d/
|
|
|
|
notify: Restart php8.2-fpm
|
|
|
|
with_fileglob: "php/8.2/fpm/pool.d/*.conf"
|
|
|
|
|
|
|
|
- name: Configure htaccess for fpm status
|
|
|
|
htpasswd:
|
|
|
|
path: /etc/nginx/fpm_status.htaccess
|
|
|
|
name: "{{ fpm_status_user}}"
|
|
|
|
password: "{{ fpm_status_pass }}"
|
|
|
|
owner: root
|
|
|
|
group: www-data
|
|
|
|
mode: 0640
|
|
|
|
|
2016-04-07 15:50:58 +02:00
|
|
|
- name: Configure certificate manager
|
2019-05-20 19:49:08 +02:00
|
|
|
copy: src=certs dest=/etc/acertmgr/www.binary-kitchen.de.conf
|
2019-02-23 23:54:24 +01:00
|
|
|
notify: Run acertmgr
|
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
|
|
|
|
|
2023-07-17 16:24:07 +02:00
|
|
|
- name: Start php8.2-fpm
|
|
|
|
service: name=php8.2-fpm state=started enabled=yes
|