diff --git a/README.md b/README.md index 563b18d..8951b41 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,10 @@ The option for being able to install the package by URL. None. +## Overwriting config values + +The values in the `local.json` file can be redefined. To do this, you need to override the necessary values in the `vars/main.yml` file in the `onlyoffice_local_json: {}` field. + ## Example Playbook - hosts: all diff --git a/tasks/main.yml b/tasks/main.yml index 5ae8bcc..e175fb2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -40,3 +40,12 @@ group: root mode: 0644 when: onlyoffice_license is defined + +- name: "Configure {{ onlyoffice_local_json_config }}" + ansible.builtin.copy: + dest: "{{ onlyoffice_local_json_config }}" + content: "{{ onlyoffice_local_json | to_nice_json(indent=2, sort_keys=false) }}\n" + mode: 0644 + when: onlyoffice_local_json + notify: Restart-ds + diff --git a/vars/main.yml b/vars/main.yml index 1e7806b..b1dbad6 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -9,3 +9,14 @@ nginx_include_path: "/etc/nginx/includes" nginx_docservice_file: "ds-docservice.conf" is_nonfree_package: "{{ 'false' if package_name == 'onlyoffice-documentserver' else 'true' }}" + +# see: https://github.com/node-config/node-config/wiki/Configuration-Files#file-load-order +onlyoffice_local_json_config: /etc/onlyoffice/documentserver/local-production-linux.json + +# settings for onlyoffice_local_json_config +# will be transformed to json +# attention, intended for experienced users only! +# see: https://github.com/node-config/node-config/wiki/Configuration-Files#arrays-are-merged-by-replacement +onlyoffice_local_json: {} +# All values that can be overridden can be found here: +# https://helpcenter.onlyoffice.com/installation/docs-developer-configuring.aspx