- name: Active le mode maintenance # noqa : command-instead-of-module
- become_user: "{{ nextcloud_websrv_user }}"
+ become_user: "{{ nextcloud_php_user }}"
become: true
ansible.builtin.command: './console maintenance:mode --on'
args:
follow: false
- name: Desactive le mode maintenance # noqa : command-instead-of-module
- become_user: "{{ nextcloud_websrv_user }}"
+ become_user: "{{ nextcloud_php_user }}"
become: true
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 }}"
+ become_user: "{{ nextcloud_php_user }}"
become: true
ansible.builtin.command: ./console upgrade
args:
- name: Bloc de tâches contrôlant la fin de la maintenance de mise à jour
block:
- name: Wait for nextcloud maintenance mode to become false # noqa : command-instead-of-module
- become_user: "{{ nextcloud_websrv_user }}"
+ become_user: "{{ nextcloud_php_user }}"
become: true
ansible.builtin.command: ./console status
args:
delay: 20
rescue:
- name: Deactivate maintenance mode manually # noqa : command-instead-of-module
- become_user: "{{ nextcloud_websrv_user }}"
+ become_user: "{{ nextcloud_php_user }}"
become: true
ansible.builtin.command: ./console maintenance:mode --off
args: