ansible-role-onlyoffice/tasks/install.yml
2023-10-25 17:07:53 +02:00

58 lines
1.7 KiB
YAML

---
- name: "Install | Add Onlyoffice repository"
block:
- name: Add repository key
ansible.builtin.get_url:
url: https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE
dest: /etc/apt/trusted.gpg.d/onlyoffice.asc
mode: "0644"
- name: Add repository
ansible.builtin.apt_repository:
repo: deb [signed-by=/etc/apt/trusted.gpg.d/onlyoffice.asc] https://download.onlyoffice.com/repo/debian squeeze main
filename: onlyoffice
update_cache: true
- name: "Install | Set debconf options"
ansible.builtin.debconf:
name: onlyoffice-documentserver
question: "onlyoffice/{{ item.question }}"
value: "{{ item.value }}"
vtype: "{{ item.vtype }}"
no_log: true
loop:
- question: db-host
value: "{{ onlyoffice_db_host }}"
vtype: string
- question: db-user
value: "{{ onlyoffice_db_user }}"
vtype: string
- question: db-pwd
value: "{{ onlyoffice_db_password }}"
vtype: password
- question: db-name
value: "{{ onlyoffice_db_name }}"
vtype: string
- question: jwt-enabled
value: true
vtype: boolean
- question: jwt-secret
value: "{{ onlyoffice_jwt_secret }}"
vtype: password
- question: ds-port
value: "{{ onlyoffice_ds_port }}"
vtype: select
- name: "Install | Install packages"
ansible.builtin.apt:
pkg:
- nginx-extras
- rabbitmq-server
- onlyoffice-documentserver
- ttf-mscorefonts-installer
- name: "Install | Bind RabbitMQ only to IP address"
ansible.builtin.lineinfile:
path: /etc/rabbitmq/rabbitmq-env.conf
line: "NODE_IP_ADDRESS={{ rabbitmq_listen_address }}"
notify: Restart RabbitMQ