ONLYOFFICE.documentserver
Ansible Role: ONLYOFFICE Document Server
This role installs and configures the ONLYOFFICE Document Server on RHEL/CentOS or Debian/Ubuntu servers.
Requirements
To install, you need PostgreSQL, RabbitMQ, and Redis servers either on your system or network. This role also needs root access. So, you should either run it in a playbook with become: yes
globally, or invoke the role in your playbook like this:
- hosts: documentserver
roles:
- role: ONLYOFFICE.documentserver
become: yes
Role Variables
Here are the available variables with their default values (refer to defaults/main.yml
):
ds_port: ""
The port where the Document Server will run. It defaults to port80
if not set.db_server_host: localhost
The IP address or name of the host running PostgreSQL.db_server_name: onlyoffice
The name of the PostgreSQL database created at startup.db_server_user: onlyoffice
The username for the PostgreSQL account with superuser permissions.db_server_pass: onlyoffice
The password for the PostgreSQL account.package_name: onlyoffice-documentserver
The package name for ONLYOFFICE Document Server.package_state: latest | present
Defines the package state. 'latest' (default) will upgrade to the latest version.redis_server_host: localhost
The IP address or name of the host running Redis.redis_server_port: 6379
The Redis server port.rabbitmq_server_host: localhost
The IP address or name of the host running RabbitMQ.rabbitmq_server_user: guest
The username for the RabbitMQ account.rabbitmq_server_pass: guest
The password for the RabbitMQ account.rabbitmq_server_vpath: /
The virtual path for the RabbitMQ server.proto: http
Choose whether to add SSL configuration.jwt_enabled: true
Enable or disable JWT token (enabled by default).jwt_secret: ""
Custom secret for JWT option; defaults to a random value.jwt_header: ""
Custom header for JWT option.key_file: "~/certs/tls.key"
Path to the key file.cert_file: "~/certs/tls.crt"
Path to the certificate file.cluster_mode: false
Enable or disable cluster mode.start_example: false
Option to start an example service after installation.package_url: ""
Option to install the package via a URL.
Dependencies
There are no dependencies.
Overwriting Config Values
You can redefine the values in the local.json
file. Override the required values in the vars/main.yml
file under the onlyoffice_local_json: {}
field.
Example Playbook
- hosts: all
become: true
vars:
postgresql_global_config_options:
- option: listen_addresses
value: "*"
- option: unix_socket_directories
value: '{{ postgresql_unix_socket_directories | join(",") }}'
- option: log_directory
value: 'log'
postgresql_hba_entries:
- type: local
database: all
user: postgres
auth_method: peer
- type: local
database: all
user: all
auth_method: peer
- type: host
database: all
user: all
address: 127.0.0.1/32
auth_method: md5
- type: host
database: all
user: all
address: ::1/128
auth_method: md5
- type: host
database: all
user: all
address: 0.0.0.0/0
auth_method: md5
postgresql_databases:
- name: "{{ db_server_name }}"
postgresql_users:
- name: "{{ db_server_user }}"
password: "{{ db_server_pass }}"
rabbitmq_users:
- user: "{{ rabbitmq_server_user }}"
password: "{{ rabbitmq_server_pass }}"
vhost: "{{ rabbitmq_server_vpath }}"
configure_priv: .*
read_priv: .*
write_priv: .*
tags: administrator
rabbitmq_users_remove: []
redis_bind_interface: 0.0.0.0
roles:
- geerlingguy.postgresql
- ONLYOFFICE.rabbitmq
- geerlingguy.redis
- ONLYOFFICE.documentserver
License
GNU AGPL v3.0
Author Information
This role was created by ONLYOFFICE.
ONLYOFFICE Docs is a free online office suite comprising viewers and editors for texts, spreadsheets, presentations, forms, and PDF files, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
ansible-galaxy install ONLYOFFICE.documentserver