You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

upgrade.yml 1.1KB

7 years ago
6 years ago
7 years ago
7 years ago
12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - name: copy old config file
  3. copy:
  4. src: "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/config/config.php"
  5. remote_src: true
  6. dest: "{{nextcloud_directory}}/config/config.php"
  7. owner: www-data
  8. group: www-data
  9. - name: get old default apps
  10. command: ls "{{nextcloud_archive_directory}}/{{nextcloud_version}}/nextcloud/apps"
  11. register: _nextcloud_old_default_apps_ls
  12. changed_when: false
  13. - name: get old actual apps
  14. command: ls "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/apps"
  15. register: _nextcloud_old_actual_apps_ls
  16. changed_when: false
  17. - name: copy old installed apps
  18. synchronize:
  19. src: "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/apps/{{item}}/"
  20. dest: "{{nextcloud_directory}}/apps/{{item}}"
  21. with_items: "{{_nextcloud_old_actual_apps_ls.stdout_lines|difference(_nextcloud_old_default_apps_ls.stdout_lines)}}"
  22. delegate_to: "{{inventory_hostname}}"
  23. - name: upgrade nextcloud
  24. command: php occ upgrade
  25. args:
  26. chdir: "{{nextcloud_directory}}"
  27. become: true
  28. become_user: www-data
  29. become_method: sudo