More config options. nginx aliases.

This commit is contained in:
Andrea Dell'Amico 2022-01-10 23:14:38 +01:00
parent 6f6940a9c0
commit 88d2432cf6
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
4 changed files with 24 additions and 2 deletions

View File

@ -6,6 +6,7 @@ nextcloud_release_channel: 'releases'
nextcloud_get_latest_stable: True
nextcloud_user: nextcloud
nextcloud_timezone: 'Europe/Rome'
nextcloud_default_phone_region: 'IT'
nextcloud_redis_cache_enabled: True
nextcloud_local_redis: '{{ nextcloud_redis_cache_enabled }}'
nextcloud_redis_params:
@ -45,10 +46,13 @@ nextcloud_log_rotation: 52
nextcloud_audit_log_enabled: True
nextcloud_encryption_enabled: True
nextcloud_servername: '{{ ansible_fqdn }}'
nextcloud_nginx_aliases: '{{ nextcloud_servername }}'
nextcloud_servernames:
- { webroot: '{{ nextcloud_web_root }}', id: 1, name: '{{ nextcloud_servername }}' }
nextcloud_trusted_proxies: []
# - { proxy_ip: '127.0.0.1/8', proxy_id: 0 }
nextcloud_http_protocol: 'https'
nextcloud_cli_url: 'http://localhost'
nextcloud_db: pgsql
nextcloud_db_host: localhost
nextcloud_db_name: nextcloud

View File

@ -36,6 +36,24 @@
chdir: '{{ nextcloud_web_root }}'
with_items: '{{ nextcloud_trusted_proxies }}'
- name: Overwrite the http protocol
shell: >
php occ config:system:set overwriteprotocol --value={{ nextcloud_http_protocol }}
args:
chdir: '{{ nextcloud_web_root }}'
- name: Overwrite the CLI URL
shell: >
php occ config:system:set overwrite.cli.url --value={{ nextcloud_cli_url }}
args:
chdir: '{{ nextcloud_web_root }}'
- name: Set the default phone region
shell: >
php occ config:system:set default_phone_region --value={{ nextcloud_default_phone_region }}
args:
chdir: '{{ nextcloud_web_root }}'
- name: Setup the email configuration with SMTP
shell: >
php occ config:system:set {{ item.name }} --value={{ item.id }}

View File

@ -24,7 +24,7 @@ server {
server {
listen {% if item.https_port is defined %} {{ item.https_port }} {% else %} {{ https_port | default('443') }} {% endif %} ssl {% if ansible_distribution_release != "trusty" %} http2{% endif %};
server_name {{ item.nginx_servername }};
server_name {{ item.nginx_servername }} {{ item.nginx_aliases }};
include /etc/nginx/snippets/nginx-server-ssl.conf;
server_tokens off;

View File

@ -87,5 +87,5 @@ nextcloud_phpfpm_pools:
req_term_timeout: '240s'
virthost: '{{ nextcloud_servername }}'
nginx_servername: '{{ nextcloud_servername }}'
nginx_aliases: '{{ nextcloud_nginx_aliases }}'