GithubHelp home page GithubHelp logo

onlyoffice / ansible-role-documentserver Goto Github PK

View Code? Open in Web Editor NEW
12.0 16.0 15.0 93 KB

Ansible Role Document Server

Home Page: https://galaxy.ansible.com/ONLYOFFICE/documentserver/

License: GNU Affero General Public License v3.0

ansible-role ansible-galaxy onlyoffice documentserver

ansible-role-documentserver's Introduction

Ansible Role: ONLYOFFICE Document Server

Test

Installs and configures ONLYOFFICE Document Server on RHEL/CentOS or Debian/Ubuntu servers.

Requirements

Installation requires PostgreSQL, RabbitMQ and Redis server in the system or network. Also this role requires root access, so either run it in a playbook with a global become: yes, or invoke the role in your playbook like:

- hosts: documentserver
  roles:
    - role: ONLYOFFICE.documentserver
      become: yes

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

ds_port: ""

The port where documentserver is running, if you do not set this variable, documentserver is will be runned by default on port 80.

db_server_host: localhost

The IP address or the name of the host where the PostgreSQL server is running.

db_server_name: onlyoffice

The name of a PostgreSQL database to be created on the image startup.

db_server_user: onlyoffice

The new user name with superuser permissions for the PostgreSQL account.

db_server_pass: onlyoffice

The password set for the PostgreSQL account.

package_name: onlyoffice-documentserver

The package name of the ONLYOFFICE Document Server.

package_state: latest | present

The package state of the ONLYOFFICE Document Server. If set to latest (default), a upgrade will be performed!

redis_server_host: localhost

The IP address or the name of the host where the Redis server is running.

redis_server_port: 6379

The Redis server port number.

rabbitmq_server_host: localhost

The IP address or the name of the host where the RabbitMQ server is running.

rabbitmq_server_user: guest

The new user name for the RabbitMQ account.

rabbitmq_server_pass: guest

The password set for the RabbitMQ account.

rabbitmq_server_vpath: /

The virtual path for the RabbitMQ server.

proto: http

The option to add ssl configuration or not.

jwt_enabled: true

The option for enable or disable JWT token. Enabled by default

jwt_secret: ""

The custom secret set for jwt option. Random value by default

jwt_header: ""

The custom header set for jwt option.

key_file: "~/certs/tls.key"

The path to the key file.

cert_file: "~/certs/tls.crt"

The path to the certificate file.

cluster_mode: false

The option to enable or disable cluster mode.

start_example: false

The option for starting example service after install.

package_url: "" 

The option for being able to install the package by URL.

Dependencies

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
  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.

ansible-role-documentserver's People

Contributors

agolybev avatar cyger avatar danilapog avatar doobry-systemli avatar pulse-mind avatar t2d avatar xrtrx avatar zerwes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-documentserver's Issues

Install documentserver task fails on Ubuntu 18.04

The --force-yes apt flag is no longer supported in Ubuntu 18.04 which results in the failing of the "Install documentserver" task. In fact this is probably a general Ansible problem, but should this role be changed in order to address this problem?

no `json` found in $PATH

The Debian tasks depend on a binary called json (provided by the NPM json module) in your $PATH. Running the playbook on Debian results in the Set up ... tasks failing du to json not being available.

I were able to fix this locally by running the following commands:

npm install -g json
ln -s /usr/local/lib/npm/bin/json /usr/local/bin/json

Update test/example

  1. Add 'nodejs_install_npm_user: root' to your vars section. Otherwise node tried to install on the remote box as the same user that is running the script. As this should be a server, this make the install happen.

  2. Rabbit is not starting on reboot. again, to your vars section add the following line to correct: 'rabbitmq_enabled: yes'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.