maj creation_nuage
[lhc/ansible.git] / tasks / update_nextcloud.yml
index 850be74..e7e9855 100644 (file)
@@ -1,8 +1,9 @@
-- name: Stop webserver service
+- name: Active le mode maintenance  # noqa : command-instead-of-module
+  become_user: "{{ nextcloud_websrv_user }}"
   become: true
-  ansible.builtin.service:
-    name: "{{ nextcloud_websrv }}"
-    state: stopped
+  ansible.builtin.command: './console maintenance:mode --on'
+  args:
+    chdir: "{{ nextcloud_webroot }}"
 
 - name: Update nextcloud root dir symbolic link
   become: true
     state: link
     follow: false
 
-- name: Start webserver service
+- name: Desactive le mode maintenance # noqa : command-instead-of-module
+  become_user: "{{ nextcloud_websrv_user }}"
   become: true
-  ansible.builtin.service:
-    name: "{{ nextcloud_websrv }}"
-    state: started
+  ansible.builtin.command: './console maintenance:mode --off'
+  args:
+    chdir: "{{ nextcloud_webroot }}"
 
 - name: Run nextcloud upgrade script # noqa : command-instead-of-module
   become_user: "{{ nextcloud_websrv_user }}"