From 845a9f3c76ca28dde0719e9d8f5c776580bbe5ef Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 19 Feb 2019 09:31:33 +0100 Subject: [PATCH] dss: remove unused role (replaced by bk-dss) --- .../files/systemd/system/uwsgi-app@.service | 15 ------- .../files/systemd/system/uwsgi-app@.socket | 11 ----- roles/dss/files/uwsgi/apps-available/dss.ini | 6 --- roles/dss/handlers/main.yml | 4 -- roles/dss/meta/main.yml | 5 --- roles/dss/tasks/main.yml | 41 ------------------- roles/dss/templates/certs.j2 | 15 ------- roles/dss/templates/vhost.j2 | 34 --------------- 8 files changed, 131 deletions(-) delete mode 100644 roles/dss/files/systemd/system/uwsgi-app@.service delete mode 100644 roles/dss/files/systemd/system/uwsgi-app@.socket delete mode 100644 roles/dss/files/uwsgi/apps-available/dss.ini delete mode 100644 roles/dss/handlers/main.yml delete mode 100644 roles/dss/meta/main.yml delete mode 100644 roles/dss/tasks/main.yml delete mode 100644 roles/dss/templates/certs.j2 delete mode 100644 roles/dss/templates/vhost.j2 diff --git a/roles/dss/files/systemd/system/uwsgi-app@.service b/roles/dss/files/systemd/system/uwsgi-app@.service deleted file mode 100644 index 2535df3..0000000 --- a/roles/dss/files/systemd/system/uwsgi-app@.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=%i uWSGI app -After=syslog.target - -[Service] -ExecStart=/usr/bin/uwsgi \ - --ini /etc/uwsgi/apps-available/%i.ini \ - --socket /var/run/uwsgi/%i.socket -User=www-data -Group=www-data -Restart=on-failure -KillSignal=SIGQUIT -Type=notify -StandardError=syslog -NotifyAccess=all diff --git a/roles/dss/files/systemd/system/uwsgi-app@.socket b/roles/dss/files/systemd/system/uwsgi-app@.socket deleted file mode 100644 index 65aff27..0000000 --- a/roles/dss/files/systemd/system/uwsgi-app@.socket +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Socket for uWSGI app %i - -[Socket] -ListenStream=/var/run/uwsgi/%i.socket -SocketUser=www-data -SocketGroup=www-data -SocketMode=0660 - -[Install] -WantedBy=sockets.target diff --git a/roles/dss/files/uwsgi/apps-available/dss.ini b/roles/dss/files/uwsgi/apps-available/dss.ini deleted file mode 100644 index 91068ef..0000000 --- a/roles/dss/files/uwsgi/apps-available/dss.ini +++ /dev/null @@ -1,6 +0,0 @@ -[uwsgi] -chdir = /var/www/dss -wsgi-file = index.py -callable = app -processes = 4 -threads = 2 diff --git a/roles/dss/handlers/main.yml b/roles/dss/handlers/main.yml deleted file mode 100644 index 44975c4..0000000 --- a/roles/dss/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -- name: Restart nginx - service: name=nginx state=restarted diff --git a/roles/dss/meta/main.yml b/roles/dss/meta/main.yml deleted file mode 100644 index 8d2c010..0000000 --- a/roles/dss/meta/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -dependencies: -- { role: certmgr } -- { role: nginx, nginx_ssl: True } diff --git a/roles/dss/tasks/main.yml b/roles/dss/tasks/main.yml deleted file mode 100644 index 7adfc99..0000000 --- a/roles/dss/tasks/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- - -- name: Install dependencies - apt: name={{ item }} - with_items: - - python-flask - - python-flaskext.wtf - - python-ldap - - python-passlib - - python-redis - - redis-server - - uwsgi - -#- name: Install bk-dss -# git: repo=https://github.com/moepman/bk-diss.git dest=/var/www/dss depth=1 version=ca364a7dd456b7f6060213102d136148784b6a47 - -# TODO Configure bk-dss - -# TODO Configure redis - -#- name: Configure uwsgi service -# copy: src={{ item }} dest=/etc/{{ item }} -# with_items: -# - uwsgi/apps-available/dss.ini -# - systemd/system/uwsgi-app@.socket -# - systemd/system/uwsgi-app@.service -# notify: Restart uwsgi-app@dss - -#- name: Configure certificate manager for dss -# template: src=certs.j2 dest=/etc/acme/domains.d/{{ dss_domain }}.conf - -#- name: Configure vhost -# template: src=vhost.j2 dest=/etc/nginx/sites-available/dss -# notify: Restart nginx - -#- name: Enable vhost -# file: src=/etc/nginx/sites-available/dss dest=/etc/nginx/sites-enabled/dss state=link -# notify: Restart nginx - -#- name: Start uwsgi -# service: name=uwsgi-app@dss state=started enabled=yes diff --git a/roles/dss/templates/certs.j2 b/roles/dss/templates/certs.j2 deleted file mode 100644 index 8924657..0000000 --- a/roles/dss/templates/certs.j2 +++ /dev/null @@ -1,15 +0,0 @@ ---- - -{{ dss_domain }}: -- path: /etc/nginx/ssl/{{ dss_domain }}.key - user: root - group: root - perm: '400' - format: key - action: '/usr/sbin/service nginx restart' -- path: /etc/nginx/ssl/{{ dss_domain }}.crt - user: root - group: root - perm: '400' - format: crt,ca - action: '/usr/sbin/service nginx restart' diff --git a/roles/dss/templates/vhost.j2 b/roles/dss/templates/vhost.j2 deleted file mode 100644 index dda6409..0000000 --- a/roles/dss/templates/vhost.j2 +++ /dev/null @@ -1,34 +0,0 @@ -server { - listen 80; - listen [::]:80; - - server_name {{ dss_domain }}; - - location /.well-known/acme-challenge { - default_type "text/plain"; - alias /var/www/acme-challenge; - } - - location / { - return 301 https://{{ dss_domain }}$request_uri; - } -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - - server_name {{ dss_domain }}; - - ssl_certificate_key /etc/nginx/ssl/{{ dss_domain }}.key; - ssl_certificate /etc/nginx/ssl/{{ dss_domain }}.crt; - - root /var/www/dss/; - - uwsgi_pass /var/run/uwsgi/dss.socket; - include uwsgi_params; - - location /static { - root /var/www/dss/; - } -}