ansible-roles/library/roles/onlyoffice_docserver/tasks/main.yml

41 lines
1.7 KiB
YAML

---
- block:
- name: Install the deb OnlyOffice repository key
apt_key:
keyserver: '{{ onlyoffice_docserver_deb_repo_key_server }}'
id: '{{ onlyoffice_docserver_deb_repo_key }}'
- name: Install the deb OnlyOffice repository
apt_repository:
repo: '{{ onlyoffice_docserver_deb_repo }}'
state: present
update_cache: yes
- 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/ds.conf
when: onlyoffice_docserver_letsencrypt_managed | bool
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'"
# - name: Install the OnlyOffice document server package
# apt: name={{ onlyoffice_docserver_packages }} state=present cache_valid_time=1800
when: ansible_distribution_file_variety == "Debian"
tags: onlyoffice