-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- determine appropriate setup procedure depending on whether nextcloud is already installed or not, installed version and current role version - use ansible local fact file to store nextcloud installed version - use temporary extraction directory and replace the old copy with the new one instead of unpacking directly into the documentroot - installation is now idempotent - ensure correct/restrictive permissions are set - nextcloud: move apache configuration steps to separate file, add automatic virtualhost configuration for nextcloud, group previous CSP settings in vhost configuration file - reorder setup procedure (setup apache last) - enable additional php modules https://docs.nextcloud.com/server/16/admin_manual/installation/source_installation.html#apache-web-server-configuration - Note: 'become' is not a valid attribute for a TaskInclude, use include - https://docs.ansible.com/ansible/latest/modules/include_module.html - reload apache instead of restarting when possible - fix Module did not set no_log for update_password (mysql_user) - update documentation, add screenshots - use ansible-vault to manage secret variables by default - templatize nextcloud domain name/install directory/full URL - make app enable/disable task idempotent - nextcloud/server#19514, nextcloud/server#17789 - require manual configuration of nextcloud FQDN - update calendar app to 2.0.2 - https://docs.nextcloud.com/server/16/admin_manual/maintenance/manual_upgrade.html - update doc - add php-mysql requirement - update role metadata, depends on lamp role - upgrade nextcloud to 19.0.0, upgrade all nextcloud apps - add fine-grained ansible tags - upgrade: copy config.php from the old installation to the new, fix permissions - apache: integration Unset system-wide Content-Security-Policy header since Nextcloud provides its own CSP - add nextcloud_https_mode config variable (selfsigned/letsencrypt/none) - add tasks to generate self-signed certificates - automatically install applications using occ app:install command, remove app-related variables and ansible tasks - upgrade all applications during setup - enable APCu memcache https://docs.nextcloud.com/server/19/admin_manual/configuration_server/caching_configuration.html - gallery app replaced with photos app - update doc - fix upgrade mechanism/only copy old config.pho when nextcloud_action == 'upgrade' - remove old installation directory at the end of upgrades note on upgrades: 'Exception: Updates between multiple major versions and downgrades are unsupported.' note on config.php file ownership/permissions: occ has to be executed with the user that owns the file config/config.php either www-data must OWN config.php (rw group access is not enough), or we have to run occ as root - the first option is probably closer to least-privilege principle note on data directory permissions: Your data directory is readable by other users Please change the permissions to 0770 so that the directory cannot be listed by other users. An unhandled exception has been thrown: Exception: Environment not properly prepared
- Loading branch information
Showing
11 changed files
with
334 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,6 @@ galaxy_info: | |
- webdav | ||
- drive | ||
- web | ||
|
||
dependencies: | ||
- lamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
|
||
- name: enable apache2 modules | ||
command: a2enmod {{ item }} | ||
with_items: | ||
- 'rewrite' | ||
- 'headers' | ||
- 'env' | ||
- 'dir' | ||
- 'mime' | ||
args: | ||
creates: "/etc/apache2/mods-enabled/{{ item }}.load" | ||
notify: reload apache | ||
|
||
- name: check that nextcloud_https_mode is one of none/selfsigned/letsencrypt | ||
assert: | ||
that: nextcloud_https_mode in ['none', 'selfsigned', 'letsencrypt'] | ||
fail_msg: "Unsupported nextcloud_https_mode: {{ nextcloud_https_mode }}" | ||
|
||
- name: copy apache2 virtualhost configuration | ||
template: | ||
src: etc_apache2_sites-available_nextcloud.conf.j2 | ||
dest: /etc/apache2/sites-available/nextcloud.conf | ||
notify: reload apache | ||
|
||
- name: enable apache2 virtualhost | ||
command: a2ensite nextcloud | ||
args: | ||
creates: "/etc/apache2/sites-enabled/nextcloud.conf" | ||
notify: restart apache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.