- ---
-
- - name: copy old config file
- copy:
- src: "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/config/config.php"
- remote_src: true
- dest: "{{nextcloud_directory}}/config/config.php"
- owner: www-data
- group: www-data
-
- - name: get old default apps
- command: ls "{{nextcloud_archive_directory}}/{{nextcloud_version}}/nextcloud/apps"
- register: _nextcloud_old_default_apps_ls
- changed_when: false
-
- - name: get old actual apps
- command: ls "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/apps"
- register: _nextcloud_old_actual_apps_ls
- changed_when: false
-
- - name: copy old installed apps
- synchronize:
- src: "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/apps/{{item}}/"
- dest: "{{nextcloud_directory}}/apps/{{item}}"
- with_items: "{{_nextcloud_old_actual_apps_ls.stdout_lines|difference(_nextcloud_old_default_apps_ls.stdout_lines)}}"
- delegate_to: "{{inventory_hostname}}"
-
- - name: upgrade nextcloud
- command: php occ upgrade
- args:
- chdir: "{{nextcloud_directory}}"
- become: true
- become_user: www-data
- become_method: sudo
|