Make nextcloud role generic

This commit is contained in:
Ivan R. 2024-11-02 19:25:05 +05:00
parent 7879676250
commit 28d8f5d640
Signed by: lumin
GPG key ID: E0937DC7CD6D3817
5 changed files with 33 additions and 8 deletions

View file

@ -6,6 +6,9 @@
password_salt: "{{ nextcloud.password_salt }}" password_salt: "{{ nextcloud.password_salt }}"
secret: "{{ nextcloud.secret }}" secret: "{{ nextcloud.secret }}"
db_password: "{{ postgresql_users.nextcloud }}" db_password: "{{ postgresql_users.nextcloud }}"
mail_domain: comfycamp.space
smtp_host: comfycamp.space
smtp_name: nextcloud@comfycamp.space
smtp_password: "{{ mail_users['nextcloud@comfycamp.space'] }}" smtp_password: "{{ mail_users['nextcloud@comfycamp.space'] }}"
url: https://nc.comfycamp.space url: https://nc.comfycamp.space
trusted_domains: ["nc.comfycamp.space"] trusted_domains: ["nc.comfycamp.space"]

View file

@ -2,6 +2,10 @@
argument_specs: argument_specs:
main: main:
options: options:
version:
type: str
overwrite_protocol:
type: str
instance_id: instance_id:
type: str type: str
required: true required: true
@ -23,9 +27,28 @@ argument_specs:
elements: str elements: str
required: true required: true
description: "example.com" description: "example.com"
db_type:
type: str
db_name:
type: str
db_host:
type: str
db_port:
type: int
db_user:
type: str
db_password: db_password:
type: str type: str
required: true mail_from_address:
type: str
mail_domain:
type: str
smtp_host:
type: str
smtp_port:
type: int
smtp_name:
type: str
smtp_password: smtp_password:
type: str type: str
required: true required: true

View file

@ -24,7 +24,7 @@
become: true become: true
community.docker.docker_container: community.docker.docker_container:
name: nextcloud-{{ item }} name: nextcloud-{{ item }}
image: nextcloud:{{ version }}-apache image: nextcloud:30.0.1-apache
networks: networks:
- name: nextcloud - name: nextcloud
- name: haproxy - name: haproxy

View file

@ -4,7 +4,7 @@ $CONFIG = array (
'instanceid' => '{{ instance_id }}', 'instanceid' => '{{ instance_id }}',
'passwordsalt' => '{{ password_salt }}', 'passwordsalt' => '{{ password_salt }}',
'secret' => '{{ secret }}', 'secret' => '{{ secret }}',
'version' => '{{ full_version }}', 'version' => '{{ version }}',
'dbtype' => '{{ db_type }}', 'dbtype' => '{{ db_type }}',
'overwrite.cli.url' => '{{ url }}', 'overwrite.cli.url' => '{{ url }}',
'overwriteprotocol' => '{{ overwrite_protocol }}', 'overwriteprotocol' => '{{ overwrite_protocol }}',

View file

@ -1,5 +1,4 @@
version: 30.0.1 version: 30.0.1.2
full_version: 30.0.1.2
overwrite_protocol: https overwrite_protocol: https
db_type: pgsql db_type: pgsql
@ -9,10 +8,10 @@ db_port: 5432
db_user: nextcloud db_user: nextcloud
mail_from_address: nextcloud mail_from_address: nextcloud
mail_domain: comfycamp.space mail_domain: ""
smtp_host: comfycamp.space smtp_host: ""
smtp_port: 587 smtp_port: 587
smtp_name: nextcloud@comfycamp.space smtp_name: ""
redis_host: nextcloud-redis redis_host: nextcloud-redis
redis_port: 6379 redis_port: 6379