onlyoffice document server: install the local configuration settings from a template.

This commit is contained in:
Andrea Dell'Amico 2019-03-26 15:21:55 +01:00
parent 8c2bc364c9
commit 2ed9ff6e09
3 changed files with 28 additions and 10 deletions

View File

@ -23,3 +23,14 @@ onlyoffice_docserver_deb_packages_dependencies:
onlyoffice_docserver_packages:
- onlyoffice-documentserver
onlyoffice_docserver_db_host: localhost
onlyoffice_docserver_db_user: onlyoffice
onlyoffice_docserver_db_name: onlyoffice
#onlyoffice_docserver_db_pwd: 'put it into a vault file'
onlyoffice_docserver_redis_host: localhost
onlyoffice_docserver_rabbitmq_url: 'amqp://guest:guest@localhost'
onlyoffice_docserver_use_a_secret_key: 'true'
#onlyoffice_docserver_secret_key: 'put it into a vault file'

View File

@ -14,6 +14,21 @@
- name: Install the OnlyOffice document server deb dependencies
apt: name={{ onlyoffice_docserver_deb_packages_dependencies }} state=present cache_valid_time=1800
- name: Create some OnlyOffice directories where we will install our config files
file: dest={{ item }} state=directory
with_items:
- /etc/onlyoffice/documentserver
- /etc/onlyoffice/documentserver/nginx
- name: Install the OnlyOffice local configuration from a template
template: src=local.json dest=/etc/onlyoffice/documentserver/local.json owner=root group=root mode=0444
- name: Install the OnlyOffice document server configuration that enables SSL
template: src=onlyoffice-documentserver-ssl.conf dest=/etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
when: onlyoffice_docserver_letsencrypt_managed
notify: Reload nginx
tags: [ 'onlyoffice', 'letsencrypt', 'nginx' ]
- name: The OnlyOffice document server packages must be done manually, because it is interactive
debug:
msg: "Manually install the onlyoffice-documentserver package with 'apt-get install -y onlyoffice-documentserver'"
@ -23,12 +38,3 @@
when: ansible_distribution_file_variety == "Debian"
tags: onlyoffice
- block:
- name: Install the OnlyOffice document server configuration that enables SSL
template: src=onlyoffice-documentserver-ssl.conf dest=/etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
when: onlyoffice_docserver_use_nginx_role
notify: Reload nginx
when: ansible_distribution_file_variety == "Debian"
tags: [ 'onlyoffice', 'letsencrypt' ]

View File

@ -9,4 +9,5 @@ psql_version: 11
pg_backup_retain_copies: 2
psql_db_data:
- { name: 'onlyoffice', encoding: 'UTF8', user: 'onlyoffice', roles: 'NOCREATEDB,NOSUPERUSER', pwd: '{{ onlyoffice_docserver_db_pwd }}', managedb: True, allowed_hosts: [ '127.0.0.1' ] }
- { name: '{{ onlyoffice_docserver_db_name }}', encoding: 'UTF8', user: '{{ onlyoffice_docserver_db_user }}', roles: 'NOCREATEDB,NOSUPERUSER', pwd: '{{ onlyoffice_docserver_db_pwd }}', managedb: True, allowed_hosts: [ '127.0.0.1' ] }