-- 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 }}"