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