- name: Update nextcloud common app dir symbolic link
become: true
ansible.builtin.file:
- src: "../../../nextcloud/sources/nextcloud-{{ ancienne_version }}"
+ src: "../../../nextcloud/common/nextcloud-{{ ancienne_version }}"
dest: "{{ nextcloud_webroot }}/common"
owner: nextcloud
group: nextcloud
name: "{{ nextcloud_db_name }}"
state: "{{ item }}"
owner: "{{ nextcloud_php_user }}"
- target: "/tmp/{{ nextcloud_db_name }}.pgc"
+ target: "{{ nextcloud_webroot }}/data/{{ nextcloud_db_name }}.pgc"
target_opts: "-F c"
+ force: yes
loop:
- absent
- present
args:
chdir: "{{ nextcloud_webroot }}"
-- name: Run nextcloud upgrade script # noqa : command-instead-of-module
+- name: Lancement de commande de maintenance # noqa : command-instead-of-module
become_user: "{{ nextcloud_php_user }}"
become: true
- ansible.builtin.command: ./console upgrade
+ ansible.builtin.command: "./console {{ command }}"
args:
chdir: "{{ nextcloud_webroot }}"
+ loop:
+ - upgrade
+ - db:add-missing-columns
+ - db:add-missing-indices
+ - db:add-missing-primary-keys
+ loop_control:
+ loop_var: command
register: nc_upgrade_result
- name: Obtenir la version actuelle # noqa : command-instead-of-module