Solution to synchronize from vps web server to local web server

hello,
if you need help about this, see my task dor ansible playbook to import your files web server project to you local server host :

- hosts: servers
  become: yes
  vars:
    symfony_root: /var/www/monSite/
    local_project_root: "/home/alexandre/Documents/monSite"

  tasks:
    - debug:
        msg: "Ansible version: {{ ansible_version.full }}"

    - name: Synchronize files from server to local
      ansible.posix.synchronize:
        src: "{{ symfony_root }}"
        dest: "{{ local_project_root }}"
        mode: pull
        compress: true
        delete: no
        rsync_opts:
          - "--exclude=.git"
          - "--exclude=*.sh"
          - "--exclude=/vendor"
          - "--exclude=var/cache/*"
          - "--exclude=var/log/*"
          - "--exclude=.env.local"
          - "-v"
      delegate_to: localhost

with pull instruction in the properties of the task, synchronize
Regards

Bonjour,
[FRA]
je partage ici , mon nouveau script yaml de synchronisation de projet, venant de mon serveur web.
[ENG]
I share here, my new project synchronization yaml script, coming from my web server.
[DE]
Ich teile hier , mein neues yaml-Projekt-Synchronisations-Skript von meinem Webserver.
[SPA]
Comparto aquí , mi nuevo script yaml de sincronización del proyecto, desde mi servidor web.
[ITA]
Condivido qui , il mio nuovo script yaml di sincronizzazione del progetto, dal mio server web.

- hosts: servers
  become: yes
  vars:
    symfony_root: /var/www/AnalyticaTechCode/
    local_project_root: "/home/alexandre/Documents/AnalyticaTechCode"

  tasks:
    - debug:
        msg: "Ansible version: {{ ansible_version.full }}"

    - name: Synchronize files from server to local
      ansible.posix.synchronize:
        src: "{{ symfony_root }}"
        dest: "{{ local_project_root }}"
        mode: pull
        compress: true
        delete: no
        rsync_opts:
          - "--iconv=utf-8,utf-8"
          - "--exclude=.git"
          - "--exclude=*.sh"
          - "--exclude=/vendor"
          - "--exclude=/ansible"
          - "--exclude=var/cache/*"
          - "--exclude=var/log/*"
          - "--exclude=.env.local"
          - "-v"
      delegate_to: localhost

[FRA]
le delegate_to: localhost, pour ceux qui auraient mal compris , veint du fait que l’on envoie depuis le serveur.
[ITA]:
la delegate_to: localhost, per chi avesse frainteso , deriva dal fatto che si invia dal server.
[SPA]
la delegate_to: localhost, para los que no hubieran entendido , se debe al hecho de que se envía desde el servidor.
[DE]
der delegate_to: localhost, für diejenigen, die es missverstanden haben, ist das Senden vom Server.
[ENG]
the delegate_to: localhost, for those who misunderstood, thanks to the fact that we are sending from the server.

Cordialement
Alexandre