From f3916b1076b245629e50d880e9f325fb2a27f660 Mon Sep 17 00:00:00 2001 From: Corbin Bartsch Date: Tue, 12 Apr 2022 12:09:41 -0400 Subject: [PATCH] Removed option for directory-based Apache2 configuration --- defaults/main.yaml | 3 --- tasks/apache2_template.yaml | 15 ++------------- templates/apache2_directory_nextcloud.conf.j2 | 13 ------------- ...extcloud.conf.j2 => apache2_nextcloud.conf.j2} | 0 4 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 templates/apache2_directory_nextcloud.conf.j2 rename templates/{apache2_virtualhost_nextcloud.conf.j2 => apache2_nextcloud.conf.j2} (100%) diff --git a/defaults/main.yaml b/defaults/main.yaml index 2ca9a7e..ef876c6 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -14,9 +14,6 @@ nextcloud_ssl_key_path: "/etc/ssl/nginx/{{ nextcloud_subdomain }}.{{ domain_name # Apache configuration -# Configure with virtualhost rather than directory-based Apache site -nextcloud_apache2_virtualhost: false - # If using mod_fcgi rather than the standard mod_php, we should also enable mod_setenvif nextcloud_apache2_fcgi: false diff --git a/tasks/apache2_template.yaml b/tasks/apache2_template.yaml index 782874f..2887ad8 100644 --- a/tasks/apache2_template.yaml +++ b/tasks/apache2_template.yaml @@ -1,20 +1,9 @@ --- -- name: Write directory-based nextcloud.conf file +- name: Write Apache2 nextcloud.conf file ansible.builtin.template: - src: apache2_directory_nextcloud.conf.j2 + src: apache2_nextcloud.conf.j2 dest: "{{ nextcloud_apache2_config_path }}" mode: '0644' become: true - when: not nextcloud_apache2_virtualhost - notify: - - Enable Nextcloud site - -- name: Write virtualhost nextcloud.conf file - ansible.builtin.template: - src: apache2_virtualhost_nextcloud.conf.j2 - dest: "{{ nextcloud_apache2_config_path }}" - mode: '0644' - become: true - when: nextcloud_apache2_virtualhost notify: - Enable Nextcloud site diff --git a/templates/apache2_directory_nextcloud.conf.j2 b/templates/apache2_directory_nextcloud.conf.j2 deleted file mode 100644 index c5c5182..0000000 --- a/templates/apache2_directory_nextcloud.conf.j2 +++ /dev/null @@ -1,13 +0,0 @@ -# {{ ansible_managed }} - -Alias /nextcloud "{{ nextcloud_www_path }}" - - - Require all granted - AllowOverride All - Options FollowSymLinks MultiViews - - - Dav off - - diff --git a/templates/apache2_virtualhost_nextcloud.conf.j2 b/templates/apache2_nextcloud.conf.j2 similarity index 100% rename from templates/apache2_virtualhost_nextcloud.conf.j2 rename to templates/apache2_nextcloud.conf.j2