Update to 2021-01-04 18:00

master
Daniel Berteaud 4 years ago
parent 3b0205c3af
commit 8a2246d5c2
  1. 1
      roles/onlyoffice_document_server/meta/main.yml
  2. 17
      roles/onlyoffice_document_server/tasks/facts.yml
  3. 15
      roles/onlyoffice_document_server/tasks/install.yml
  4. 1
      roles/onlyoffice_document_server/tasks/main.yml
  5. 14
      roles/onlyoffice_document_server/tasks/write_version.yml

@ -2,7 +2,6 @@
dependencies: dependencies:
- role: repo_onlyoffice - role: repo_onlyoffice
- role: repo_nodejs
- role: nginx - role: nginx
- role: redis_server - role: redis_server
- role: rabbitmq_server - role: rabbitmq_server

@ -15,3 +15,20 @@
- pass_file: /etc/onlyoffice/meta/ansible_db_pass - pass_file: /etc/onlyoffice/meta/ansible_db_pass
- set_fact: oo_db_pass={{ rand_pass }} - set_fact: oo_db_pass={{ rand_pass }}
tags: oo tags: oo
- name: Detect installed version
shell: rpm -q --qf "%{version}-%{release}" onlyoffice-documentserver || echo 0
args:
warn: False
register: oo_current_version
changed_when: False
tags: oo
- block:
- import_tasks: ../includes/webapps_set_install_mode.yml
vars:
- root_dir: /etc/onlyoffice/
- version: "{{ oo_current_version.stdout }}"
- set_fact: oo_install_mode={{ install_mode }}
tags: oo

@ -3,11 +3,22 @@
- name: Install packages - name: Install packages
yum: yum:
name: name:
- gcc-c++ # needed to rebuild modules for spellchecker
- nodejs
- onlyoffice-documentserver - onlyoffice-documentserver
tags: oo tags: oo
# Font generation migh fail during upgrades, which can result in a broken install
# like https://github.com/ONLYOFFICE/DocumentServer/issues/1106
- when: oo_install_mode != 'none'
block:
- name: Stop services
service: name={{ item }} state=stopped
loop: "{{ oo_services }}"
failed_when: False # don't fail on initial install when the services doesn't exist yet
- name: Generate fonts
command: documentserver-generate-allfonts.sh true
tags: oo
- name: Fix permissions on onlyoffice web resources - name: Fix permissions on onlyoffice web resources
file: path=/var/www/onlyoffice state=directory mode=755 file: path=/var/www/onlyoffice state=directory mode=755
tags: oo tags: oo

@ -8,3 +8,4 @@
- include: selinux.yml - include: selinux.yml
when: ansible_selinux.status == 'enabled' when: ansible_selinux.status == 'enabled'
- include: services.yml - include: services.yml
- include: write_version.yml

@ -0,0 +1,14 @@
---
- name: Detect installed version
shell: rpm -q --qf "%{version}-%{release}" onlyoffice-documentserver || echo 0
args:
warn: False
register: oo_current_version
changed_when: False
#when: oo_current_version | string == '0' # Only detect again on first install
tags: oo
- name: Write current version
copy: content={{ oo_current_version.stdout }} dest=/etc/onlyoffice/meta/ansible_version
tags: oo
Loading…
Cancel
Save