Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

51 řádky
1.8KB

  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
  15. "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/apps"
  16. register: _nextcloud_old_actual_apps_ls
  17. changed_when: false
  18. - name: copy old installed apps
  19. synchronize:
  20. src: "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/apps/{{item}}/"
  21. dest: "{{nextcloud_directory}}/custom_apps/{{item}}"
  22. with_items: "{{_nextcloud_old_actual_apps_ls.stdout_lines|difference(_nextcloud_old_default_apps_ls.stdout_lines)}}"
  23. delegate_to: "{{inventory_hostname}}"
  24. - name: get old actual custom apps
  25. command: ls
  26. "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/custom_apps"
  27. register: _nextcloud_old_actual_custom_apps_ls
  28. changed_when: false
  29. - name: copy old installed custom apps
  30. synchronize:
  31. src: "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/nextcloud/custom_apps/{{item}}/"
  32. dest: "{{nextcloud_directory}}/custom_apps/{{item}}"
  33. with_items: "{{_nextcloud_old_actual_custom_apps_ls.stdout_lines|difference(_nextcloud_old_actual_apps_ls.stdout_lines)|difference(_nextcloud_old_default_apps_ls.stdout_lines)}}"
  34. delegate_to: "{{inventory_hostname}}"
  35. - name: upgrade nextcloud
  36. command: php occ upgrade
  37. args:
  38. chdir: "{{nextcloud_directory}}"
  39. become: true
  40. become_user: www-data
  41. become_method: sudo
  42. - import_tasks: access.yml