From 713a2241debae95e5b5d4eec6ad015abdcfd774d Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Sat, 17 Mar 2018 14:04:48 +0100 Subject: [PATCH] Drop owncloud code --- defaults/main.yml | 8 -- doc/site.md | 1 - .../etc/nginx/sites-available/_owncloud.j2 | 79 ------------------- tests/includes/post_Debian.yml | 1 - tests/test.yml | 22 ------ vars/main.yml | 1 - 6 files changed, 112 deletions(-) delete mode 100644 templates/etc/nginx/sites-available/_owncloud.j2 diff --git a/defaults/main.yml b/defaults/main.yml index c0215d2..b94112a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -125,14 +125,6 @@ nginx_acmesh_dir: "/opt/acme.sh" nginx_acmesh_git_dir: "/tmp/acme.sh" nginx_acmesh_test: false -# Extra - -# Note: -# - On Debian, if you use Owncloud from Upstream repository, you must set this var to "/var/www/owncloud" -# - TODO: force this var in vars/FreeBSD.yml -nginx_owncloud_root: '/usr/share/owncloud' - - # # Debug # diff --git a/doc/site.md b/doc/site.md index fd34236..e506aa7 100644 --- a/doc/site.md +++ b/doc/site.md @@ -43,7 +43,6 @@ Templates - `_dokuwiki` - `_redirect`: should not be called explicitly - `_nagios3`: access to Nagios3 (be careful: you need to install [fcgiwrap](https://packages.debian.org/jessie/fcgiwrap)) -- `_owncloud`: access to Owncloud (note: you must set `nginx_apt_package` to //nginx-extras//) **UNSTABLE** - `_phalcon`: Phalcon PHP Framework - `_php`: PHP base template. Can work with many frameworks/tools - `_php_index`: Same as above. But you can only run index.php diff --git a/templates/etc/nginx/sites-available/_owncloud.j2 b/templates/etc/nginx/sites-available/_owncloud.j2 deleted file mode 100644 index 7d9ef7b..0000000 --- a/templates/etc/nginx/sites-available/_owncloud.j2 +++ /dev/null @@ -1,79 +0,0 @@ -{% extends "_php.j2" %} - -{% block root %} - root {{ nginx_owncloud_root }}; -{% endblock %} - -{% block template_index %} - index index.php; -{% endblock %} - -{% block template_more %} - error_page 403 /core/templates/403.php; - error_page 404 /core/templates/404.php; - gzip off; - client_max_body_size 10G; - fastcgi_buffers 64 4K; - rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; - rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect; - rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; -{% endblock %} - -{% block template_headers %} - add_header X-XSS-Protection "1; mode=block"; - add_header X-Robots-Tag none; - add_header X-Content-Type-Options nosniff; - add_header X-Download-Options noopen; - add_header X-Permitted-Cross-Domain-Policies none; - add_header X-Frame-Options SAMEORIGIN; -{% endblock %} - -{% block template_try_files %} - try_files $uri $uri/ =404; -{% endblock %} - -{% block template_upstream_location %} - location ~ /remote.php { - dav_methods PUT DELETE MKCOL COPY MOVE; - dav_ext_methods PROPFIND OPTIONS; - fastcgi_pass {{ php_upstream }}; - fastcgi_param HOME {{ nginx_owncloud_root }}; - fastcgi_param HTTP_HOME {{ nginx_owncloud_root }}; - fastcgi_param PATH /usr/local/bin:/usr/bin:/bin; - fastcgi_param modHeadersAvailable true; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - include fastcgi.conf; - } - - location ~ \.php(?:$|/) { - fastcgi_pass {{ php_upstream }}; - fastcgi_index index.php; - fastcgi_param HOME {{ nginx_owncloud_root }}; - fastcgi_param HTTP_HOME {{ nginx_owncloud_root }}; - fastcgi_param PATH /usr/local/bin:/usr/bin:/bin; - fastcgi_param modHeadersAvailable true; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - include fastcgi.conf; - } -{% endblock %} - -{% block template_local_content %} - location ~* \.(?:css|js)$ { - try_files $uri /index.php$is_args$args; - expires 2h; - } - - location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|swf)$ { - expires 2d; - } - - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } - - location ~ ^/(?:\.ht|data|config|db_structure\.xml|README){ - deny all; - } -{% endblock %} diff --git a/tests/includes/post_Debian.yml b/tests/includes/post_Debian.yml index 6d4bf93..b0a81dd 100644 --- a/tests/includes/post_Debian.yml +++ b/tests/includes/post_Debian.yml @@ -7,7 +7,6 @@ install_recommends: no with_items: - backuppc -# - owncloud - name: APT | Install nagios3 (only on old Debian releases) apt: diff --git a/tests/test.yml b/tests/test.yml index fe9d005..f0f53d3 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -447,28 +447,6 @@ when: ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', 'lt') - -# -------------------------------- -# Owncloud -# -------------------------------- -# - block: -# - name: -- VERIFY OWNCLOUD -- -# command: "curl -H 'Host: owncloud.local' http://127.0.0.1/" -# changed_when: false -# register: ownsimple -# failed_when: ownsimple.stdout.find('ownCloud') == -1 -# - name: -- VERIFY OWNCLOUD JS (FROM PHP)-- -# command: "curl -H 'Host: owncloud.local' http://127.0.0.1/index.php/core/js/oc.js" -# changed_when: false -# register: ownjsphp -# failed_when: ownjsphp.stdout.find('var oc_debug=false') == -1 -# - name: -- VERIFY OWNCLOUD JS -- -# command: "curl -H 'Host: owncloud.local' http://127.0.0.1/core/js/js.js" -# changed_when: false -# register: ownjs -# failed_when: ownjs.stdout.find('var oc_debug') == -1 -# when: ansible_distribution != 'FreeBSD' - # -------------------------------- # SSL # -------------------------------- diff --git a/vars/main.yml b/vars/main.yml index fd637c4..6749a72 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -42,7 +42,6 @@ nginx_dirs: nginx_templates_no_dir: - '_backuppc' - '_nagios3' - - '_owncloud' - '_proxy' nginx_servers_default_headers: