vars:
# config_nginx: true à l'avenir on pourrait demander à l'utilisateur de choisir si il veut configurer nginx
- # nouvelle_version: 27.1.7 # nextcloud
- # ancienne_version: 27.1.6 # nextcloud
vars_prompt:
nextcloud_common_files_path: "/home/sites/data/nextcloud/common"
nextcloud_webroot: "/home/sites/data/{{ TLD }}/{{ DOMAIN }}/nuage"
nextcloud_source: "{{ nextcloud_sources_files_path }}/nextcloud-{{ nouvelle_version }}"
-nextcloud_old_source: "{{ nextcloud_sources_files_path }}/nextcloud-{{ ancienne_version }}"
nextcloud_symbolic_source: "../../../nextcloud/sources/nextcloud-{{ nouvelle_version }}"
nextcloud_common: "{{ nextcloud_common_files_path }}/nextcloud-{{ nouvelle_version }}"
-nextcloud_old_common: "{{ nextcloud_common_files_path }}/nextcloud-{{ ancienne_version }}"
nextcloud_symbolic_common: "../../../nextcloud/common.config.php"
php_fpm_service: php{{ php_version}}-fpm
php_version: '8.2'
ansible_become: true
become_user: nextcloud
+# on utilise une version uniquement si test-nuage a préalablement été mis à jour dans cette version
+
+- name: fail si test-nuage n'a pas été mis à jour avec cette version
+ ansible.builtin.fail:
+ msg: 'il faut déjà mettre à jour test-nuage avec cette version'
+ when: not new_nextcloud_common.stat.exists and test_nuage is not defined
+
- name: Create new app common folder from old version one
become_user: nextcloud
become: true
dest: "{{ nextcloud_common_files_path }}/nextcloud-{{ nouvelle_version }}"
remote_src: true # because the copy is from remote host to remote host
mode: '754' # or 'u=rwx,g=rx,o=r'
- when: not new_nextcloud_common.stat.exists
+ when: not new_nextcloud_common.stat.exists and test_nuage is defined
ansible_become: true
become_user: nextcloud
+# on met à jour une instance uniquement si test-nuage a préalablement été mis à jour dans cette version
+
+ - name: fail si test-nuage n'a pas été mis à jour avec cette version
+ ansible.builtin.fail:
+ msg: 'il faut déjà mettre à jour test-nuage avec cette version'
+ when: not new_nextcloud_common.stat.exists and test_nuage is not defined
+
- name: Création du dossier common de la nouvelle version en utilisant les apps de l'instance test-nuage
become: true
ansible.builtin.copy:
mode: '754' # or 'u=rwx,g=rx,o=r'
owner: nextcloud
group: nextcloud
- when: not new_nextcloud_common.stat.exists
+ when: not new_nextcloud_common.stat.exists and test_nuage is defined
- name: Include backup tasks
ansible.builtin.include_tasks: tasks/backup_nextcloud.yml