forked from infra/ansible
partdb: remove role
This commit is contained in:
parent
dfe0804a3d
commit
25ef1394f4
@ -1,14 +0,0 @@
|
||||
---
|
||||
partdb.binary-kitchen.de:
|
||||
- path: /etc/nginx/ssl/partdb.binary-kitchen.de.crt
|
||||
user: root
|
||||
group: root
|
||||
perm: '400'
|
||||
format: crt,ca
|
||||
action: '/usr/sbin/service nginx restart'
|
||||
- path: /etc/nginx/ssl/partdb.binary-kitchen.de.key
|
||||
user: root
|
||||
group: root
|
||||
perm: '400'
|
||||
format: key
|
||||
action: '/usr/sbin/service nginx restart'
|
@ -1,40 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name partdb.binary-kitchen.de;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type "text/plain";
|
||||
alias /var/www/acme-challenge;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://partdb.binary-kitchen.de$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name partdb.binary-kitchen.de;
|
||||
|
||||
ssl_certificate_key /etc/nginx/ssl/partdb.binary-kitchen.de.key;
|
||||
ssl_certificate /etc/nginx/ssl/partdb.binary-kitchen.de.crt;
|
||||
|
||||
root /var/www/partdb;
|
||||
|
||||
client_max_body_size 32M;
|
||||
|
||||
index index.php;
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
|
||||
fastcgi_intercept_errors on;
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Restart nginx
|
||||
service: name=nginx state=restarted
|
||||
|
||||
- name: Run acertmgr
|
||||
command: /usr/bin/acertmgr
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: acertmgr }
|
||||
- { role: nginx, nginx_ssl: True }
|
@ -1,33 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name:
|
||||
- php7.3-fpm
|
||||
- php7.3-ldap
|
||||
- php7.3-mysql
|
||||
- php7.3-opcache
|
||||
- php7.3-sqlite3
|
||||
- php7.3-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.3-fpm
|
||||
service: name=php7.3-fpm state=started enabled=yes
|
Loading…
Reference in New Issue
Block a user