correction backup restore
[lhc/ansible.git] / tasks / update_nextcloud.yml
index ad72253..0cc7169 100644 (file)
       ansible.builtin.debug:
         var: rescue.stdout_lines
 
+- name: Lancement de commande de maintenance # noqa : command-instead-of-module
+  become_user: "{{ nextcloud_php_user }}"
+  become: true
+  ansible.builtin.command: "./console {{ command }}"
+  args:
+    chdir: "{{ nextcloud_webroot }}"
+  loop:
+    - db:add-missing-columns
+    - db:add-missing-indices
+    - db:add-missing-primary-keys
+  loop_control:
+    loop_var: command
+  register: nc_indices_cmd
+
+- name: Display each occ commands result
+  ansible.builtin.debug:
+    msg: "{{ item.stdout_lines }}"
+  loop: "{{ nc_indices_cmd.results }}"
+  loop_control:
+    label: "{{ item.command }}"
+
 - name: Reload php fpm service
   become: true
   ansible.builtin.service: