ansible-role-onlyoffice/tasks/install.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

2023-09-27 16:35:10 +02:00
---
- 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:
2023-09-27 17:57:13 +02:00
repo: deb [signed-by=/usr/share/keyrings/onlyoffice.asc] https://download.onlyoffice.com/repo/debian squeeze main
2023-09-27 16:35:10 +02:00
filename: onlyoffice
2023-09-27 17:57:13 +02:00
update_cache: true
2023-09-27 16:35:10 +02:00
- name: "Install | Set debconf options"
ansible.builtin.debconf:
name: onlyoffice-documentserver
question: "onlyoffice/{{ item.question }}"
value: "{{ item.value }}"
vtype: "{{ item.vtype }}"
2023-09-27 18:30:55 +02:00
no_log: true
2023-09-27 16:35:10 +02:00
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
2023-09-27 18:30:55 +02:00
- name: "Install | Bind RabbitMQ only to localhost"
ansible.builtin.lineinfile:
path: /etc/rabbitmq/rabbitmq-env.conf
line: NODE_IP_ADDRESS=127.0.0.1
notify: Restart RabbitMQ