ajout d'un garde fou pour la creation du dossier app common
[lhc/ansible.git] / tasks / verif_installation_nextcloud.yml
index 508c5fd..b649e2e 100644 (file)
     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
@@ -25,4 +32,4 @@
     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