sync roles with changes from OWS
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
# flush handlers to Restart code-server before install extensions
|
||||
# flush handlers to restart code-server before install extensions
|
||||
- name: Flush handlers befor continue
|
||||
meta: flush_handlers
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
register: nextcloud_dir_stat
|
||||
|
||||
- name: Install Nextcloud
|
||||
when: not nextcloud_dir_stat.stat.exists
|
||||
block:
|
||||
- name: Create nextcloud directory
|
||||
file:
|
||||
@@ -23,6 +24,7 @@
|
||||
get_url:
|
||||
url: "https://download.nextcloud.com/server/releases/latest.tar.bz2"
|
||||
dest: "/var/tmp/nextcloud.tar.gz"
|
||||
mode: "0644"
|
||||
register: nextcloud_download_archive
|
||||
until: nextcloud_download_archive is succeeded
|
||||
retries: 3
|
||||
@@ -79,17 +81,20 @@
|
||||
become_user: "{{ webserver_user }}"
|
||||
command:
|
||||
cmd: php occ config:import /tmp/nextcloud.config.json
|
||||
args:
|
||||
chdir: "{{ nextcloud_dir }}"
|
||||
|
||||
when: not nextcloud_dir_stat.stat.exists
|
||||
register: nextcloud_occ_config_import_output
|
||||
changed_when: nextcloud_occ_config_import_output.rc != 0
|
||||
|
||||
- name: Update Nextcloud
|
||||
when: nextcloud_updater
|
||||
block:
|
||||
- name: Run nextcloud's updater.phar in non-interactive way
|
||||
become: true
|
||||
become_user: "{{ webserver_user }}"
|
||||
command:
|
||||
cmd: 'php updater/updater.phar --no-interaction'
|
||||
args:
|
||||
chdir: "{{ nextcloud_dir }}"
|
||||
register: nextcloud_update_result
|
||||
changed_when: "'Start update' in nextcloud_update_result.stdout"
|
||||
@@ -97,17 +102,19 @@
|
||||
- name: Update result
|
||||
debug:
|
||||
msg: "{{ nextcloud_update_result.stdout_lines }}"
|
||||
when: nextcloud_update_result.changed
|
||||
when: nextcloud_update_result.changed # noqa: no-handler
|
||||
|
||||
- name: DB tuning after update
|
||||
become: true
|
||||
become_user: "{{ webserver_user }}"
|
||||
command:
|
||||
cmd: php occ {{ item }}
|
||||
args:
|
||||
chdir: "{{ nextcloud_dir }}"
|
||||
loop:
|
||||
- db:add-missing-indices
|
||||
- db:convert-filecache-bigint
|
||||
- integrity:check-core
|
||||
when: nextcloud_update_result.changed
|
||||
when: nextcloud_updater
|
||||
register: nextcloud_occ_update_tuning_output
|
||||
changed_when: nextcloud_occ_update_tuning_output.rc != 0
|
||||
when: nextcloud_update_result.changed # noqa: no-handler
|
||||
|
||||
Reference in New Issue
Block a user