diff --git a/group_vars/all.yml b/group_vars/all.yml index 4baf76a5..4441fe17 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -84,7 +84,6 @@ pytivo_enabled: false ### General ### - # Will be added to the docker group to give user command line access to docker ansible_nas_user: david diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index f2dd56dd..4ba82b18 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -7,4 +7,9 @@ nextcloud_data_directory: "{{ docker_home }}/nextcloud" # network nextcloud_port: "8080" -nextcloud_hostname: "nextcloud" \ No newline at end of file +nextcloud_hostname: "nextcloud" + +# username / passwords +nextcloud_sql_user: "nextcloud-user" +nextcloud_sql_pass: "nextcloud-pass" +nextcloud_sql_secret: "nextcloud-secret" \ No newline at end of file diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 6f29c57c..6ae1b9cd 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -16,9 +16,9 @@ - "{{ nextcloud_data_directory }}/mysql:/var/lib/mysql:rw" env: MYSQL_DATABASE: "nextcloud" - MYSQL_USER: "nextcloud-user" - MYSQL_PASSWORD: "nextcloud-pass" - MYSQL_ROOT_PASSWORD: "nextcloud-secret" + MYSQL_USER: "{{ nextcloud_sql_user }}" + MYSQL_PASSWORD: "{{ nextcloud_sql_pass }}" + MYSQL_ROOT_PASSWORD: "{{ nextcloud_sql_secret }}" restart_policy: unless-stopped memory: 1g @@ -36,9 +36,9 @@ env: MYSQL_HOST: "mysql" MYSQL_DATABASE: "nextcloud" - MYSQL_USER: "nextcloud-user" - MYSQL_PASSWORD: "nextcloud-pass" - NEXTCLOUD_TRUSTED_DOMAINS: "nextcloud.{{ ansible_nas_domain }}" + MYSQL_USER: "{{ nextcloud_sql_user }}" + MYSQL_PASSWORD: "{{ nextcloud_sql_pass }}" + NEXTCLOUD_TRUSTED_DOMAINS: "{{ nextcloud_hostname }}.{{ ansible_nas_domain }}" restart_policy: unless-stopped memory: 1g labels: @@ -47,4 +47,5 @@ traefik.http.routers.nextcloud.tls.certresolver: "letsencrypt" traefik.http.routers.nextcloud.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.nextcloud.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.nextcloud.loadbalancer.server.port: "80" \ No newline at end of file + traefik.http.services.nextcloud.loadbalancer.server.port: "80" +