X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tasks%2Fupdate_nextcloud.yml;h=0cc71696e94795aa13ac98e378247963ebbee7ca;hb=0c1a4b36afbe57ab17cb3ec6a0b2605d4e780ca8;hp=ad722531814739875776546afda0e834f6715a0b;hpb=d2ef9c4c99e81dc58f3d4346c362eae2c4d7915b;p=lhc%2Fansible.git diff --git a/tasks/update_nextcloud.yml b/tasks/update_nextcloud.yml index ad72253..0cc7169 100644 --- a/tasks/update_nextcloud.yml +++ b/tasks/update_nextcloud.yml @@ -69,6 +69,27 @@ 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: