Commit 334002b4 authored by HgO's avatar HgO
Browse files

Merge branch '117-configuration-de-nextcloud' into 'main'

Resolve "Configuration de Nextcloud"

Closes #117

See merge request Neutrinet/infra!132
parents 2f91cfa7 0791f421
Pipeline #614 passed with stage
in 2 minutes and 2 seconds
nextcloud_domain: files.neutrinet.be
nextcloud_postgresql_password: "{{ vault_nextcloud_postgresql_password }}"
nextcloud_trusted_proxies:
- 10.0.11.11
- 2001:913:1000:11::11
- 10.0.11.12
- 2001:913:1000:11::12
nextcloud_s3_enabled: true
nextcloud_s3_host: s3.neutrinet.be
nextcloud_s3_port: 443
nextcloud_s3_access_key: "{{ vault_nextcloud_s3_access_key }}"
nextcloud_s3_secret_key: "{{ vault_nextcloud_s3_secret_key }}"
$ANSIBLE_VAULT;1.1;AES256
65383235313334656531396631626233376165393932303462383033623366373333303933653534
3332643733653737633731333265383636373432626261620a313563653233643832376337306433
39333838646233336461343839306134303837323965373964303663663130383735626637396638
3039383834376634380a353535626564663832613930346537656632613166323737653763363239
65626161353265613433656438633730643635353636646337376132656563353766393634303562
34386636356565656133353865386536383766663632643663386435323863626534366335376432
62373432313666633464333762626439326330363532393761363766363563306235356465393534
35636230336136663430643464656431373564366133643033383965336566613666393164643363
6662
64323464383862656538373533633834303862366261393335313339626664393062333263306662
6438366465323031636635333336346534383638653463360a326366646562613033363736393036
31346236666666383462393336393133383934336463393330333337303062656334303032663934
3466333266613536320a326634343739396166653534323837323336613933313935336637373436
34613531326139643938363931666439343765303564396534373039376661333437323761343362
30636339633537306633346536346438326462343764646236393134303639663231373162663061
64356434336264313532616536376161613634616661663734303430393938333031303931393763
38663661383266303361613832353366633231323539303566306466333461656330343437333934
62303736386534663630643165323138656636306564323238646536386135313030356337346665
66363261656665353261666531393634363039393238333734393066316431373630616430333032
63376538353338343564316163363335363839353562353665333762313333316463613030636539
34366135303936636237613739313336633538636335356134333663373564393066356464356237
39653630346135636537653030343061356139376264646139326633323934363935653335623734
61326632336430336231653766313562383765326261383366383730356238356436396539653963
643566636233373835616233626533393066
nextcloud_domain: files.example.com
nextcloud_trusted_proxies: []
nextcloud_hsts_preload_enabled: false
nextcloud_max_upload_size: 512MB
......@@ -6,16 +7,8 @@ nextcloud_max_upload_size: 512MB
postgresql_host: localhost
nextcloud_postgresql_password: password
nextcloud_config:
system:
trusted_domains:
0: "{{ nextcloud_domain }}"
overwrite.cli.url: "https://{{ nextcloud_domain }}"
datadirectory: "{{ web_app_dist_dir }}/data"
dbname: "{{ web_app_owner }}"
dbhost: "{{ postgresql_host }}"
dbport: 5432
dbuser: "{{ web_app_owner }}"
dbpassword: "{{ nextcloud_postgresql_password }}"
memcache.local: \OC\Memcache\APCu
memcache.distributed: \OC\Memcache\Memcached
nextcloud_s3_enabled: false
nextcloud_s3_host: s3.example.com
nextcloud_s3_port: 443
nextcloud_s3_access_key: ""
nextclodu_s3_secret_key: ""
- name: config nextcloud
command:
cmd: "{{ php_executable }} occ config:import {{ web_app_home_dir }}/import.json"
chdir: "{{ web_app_dist_dir }}"
become_user: "{{ web_app_owner }}"
- name: Copie de la configuration de Nextcloud
copy:
content: "{{ nextcloud_config | to_json }}"
dest: "{{ web_app_dist_dir }}/import.json"
template:
src: "nextcloud/config.json.j2"
dest: "{{ web_app_home_dir }}/import.json"
owner: "{{ web_app_owner }}"
group: "{{ web_app_group }}"
mode: "u=rw,g=r,o="
register: _nextcloud_import
notify: config nextcloud
......@@ -38,5 +38,5 @@
tags: ['postgres']
- name: Configuration de Nextcloud
import_tasks: nextcloud.yml
tags: ['nextcloud']
import_tasks: config.yml
tags: ['nextcloud_config']
{
"system": {
"default_phone_region": "BE",
"trusted_domains": ["{{ nextcloud_domain }}"],
"htaccess.RewriteBase": "/",
"datadirectory": "{{ web_app_dist_dir }}/data",
"overwrite.cli.url": "https://{{ nextcloud_domain }}",
"trusted_proxies": {{ nextcloud_trusted_proxies | list | to_json }},
"dbtype": "pgsql",
"dbname": "{{ web_app_owner }}",
"dbhost": "{{ postgresql_host }}",
"dbport": 5432,
"dbuser": "{{ web_app_owner }}",
"dbpassword": {{ nextcloud_postgresql_password | string | to_json }},
{% if nextcloud_s3_enabled %}
"objectstore": {
"class": "\\OC\\Files\\ObjectStore\\S3",
"arguments": {
"bucket": "nextcloud",
"autocreate": false,
"key": "{{ nextcloud_s3_access_key }}",
"secret": "{{ nextcloud_s3_secret_key }}",
"hostname": "{{ nextcloud_s3_host }}",
"port": {{ nextcloud_s3_port }},
"use_ssl": true,
"region": "optional",
"use_path_style": true
}
},
{% else %}
"objectstore": {},
{% endif %}
"memcache.local": "\\OC\\Memcache\\APCu"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment