From 25ef1394f4e78ee0436d7508f673d17fb64d02f5 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Sat, 14 Nov 2020 11:36:01 +0100 Subject: [PATCH] partdb: remove role --- roles/partdb/files/certs | 14 ------------ roles/partdb/files/vhost | 40 ---------------------------------- roles/partdb/handlers/main.yml | 7 ------ roles/partdb/meta/main.yml | 5 ----- roles/partdb/tasks/main.yml | 33 ---------------------------- site.yml | 5 ----- 6 files changed, 104 deletions(-) delete mode 100644 roles/partdb/files/certs delete mode 100644 roles/partdb/files/vhost delete mode 100644 roles/partdb/handlers/main.yml delete mode 100644 roles/partdb/meta/main.yml delete mode 100644 roles/partdb/tasks/main.yml diff --git a/roles/partdb/files/certs b/roles/partdb/files/certs deleted file mode 100644 index 808a7a6..0000000 --- a/roles/partdb/files/certs +++ /dev/null @@ -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' diff --git a/roles/partdb/files/vhost b/roles/partdb/files/vhost deleted file mode 100644 index 396a3e5..0000000 --- a/roles/partdb/files/vhost +++ /dev/null @@ -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; - } -} diff --git a/roles/partdb/handlers/main.yml b/roles/partdb/handlers/main.yml deleted file mode 100644 index ff936dd..0000000 --- a/roles/partdb/handlers/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -- name: Restart nginx - service: name=nginx state=restarted - -- name: Run acertmgr - command: /usr/bin/acertmgr diff --git a/roles/partdb/meta/main.yml b/roles/partdb/meta/main.yml deleted file mode 100644 index 8fcf724..0000000 --- a/roles/partdb/meta/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -dependencies: -- { role: acertmgr } -- { role: nginx, nginx_ssl: True } diff --git a/roles/partdb/tasks/main.yml b/roles/partdb/tasks/main.yml deleted file mode 100644 index 71ff7e7..0000000 --- a/roles/partdb/tasks/main.yml +++ /dev/null @@ -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 diff --git a/site.yml b/site.yml index 273090f..86b26bd 100644 --- a/site.yml +++ b/site.yml @@ -90,11 +90,6 @@ - coturn - matrix -- name: Setup partdb server - hosts: krypton.binary-kitchen.net - roles: - - partdb - - name: Setup jitsi server hosts: zirconium.binary-kitchen.net roles: