- hosts: ligatures
vars:
- nouvelle_version: 27.1.1
- ancienne_version: 27.1.0
+ # domain: chatperche
+ # ancienne_version: 27.1.0
+ # nouvelle_version: 27.1.4
+ TLD: 'org'
+ DOMAIN: 'heureux-cyclage'
+ SITE: 'gestion'
+ become: true
tasks:
- # - name: Vérif si le dossier common app est créé
- # become: true
- # ansible.builtin.stat:
- # path: "/home/sites/data/nextcloud/common/nextcloud-{{ nouvelle_version }}"
- # register: new_nextcloud_common
+ # - name: Synchronisation des fichiers nextcloud présent sur ateliers dans la vm de migration nextcloud
+ # ansible.builtin.command: "rsync --delay-updates -F --compress --archive --partial rominique@ateliers.heureux-cyclage.org:{{ item }} /opt/nuage/backups/{{ DOMAIN }}/"
+ # delegate_to: vm_debian11
+ # loop:
+ # - "{{ nextcloud_webroot }}/config/config.php"
+ # register: my_output
- # - name: create new app common folder from old version one
- # become_user: nextcloud
- # become: true
- # ansible.builtin.copy:
- # src: "/home/sites/data/nextcloud/common/nextcloud-{{ ancienne_version }}"
- # dest: "/home/sites/data/nextcloud/common/nextcloud-{{ nouvelle_version }}"
- # remote_src: yes #because the config file is already in the nextcloud_tmp_path
- # mode: '754'
- # when: not new_nextcloud_common.stat.exists
+ # - name: Debug
+ # ansible.builtin.debug:
+ # var: my_output
- - name: Extract downloaded archive
- become: true
- become_user: nextcloud
- ansible.builtin.unarchive:
- src: "/tmp/test_nextcloud/groupfolder_v15.3.1.tar.gz"
- dest: "/tmp/test_nextcloud/"
- # mode: '755' #or u=rwx,g=rx,o=rx
- remote_src: yes
-
- - name: "rename"
- become: true
- become_user: nextcloud
- ansible.builtin.copy:
- src: "/tmp/test_nextcloud/groupfolders-15.3.1/"
- dest: "/tmp/test_nextcloud/groupfolder"
- remote_src: yes #because the config file is already in the nextcloud_tmp_path
-
- - name: deleted downloaded nextcloud files
- become: true
- become_user: nextcloud
- ansible.builtin.file:
- path: "{{ item }}"
- state: absent
- loop:
- - "/tmp/test_nextcloud/groupfolders-15.3.1"
\ No newline at end of file
+ - name: Inclure le configuration du backup
+ ansible.builtin.include_tasks: tasks/config_backup.yml
\ No newline at end of file