Module synchronize in Ansible

Hey guy !!

I have on problem, i want synchronize two repertory who are in destination host (source and destination), my task is :

  • name: “Copie de la partie front-office”
    synchronize:
    src: /var/apps/hospitalis-frontoffice/{{ version }}/fo/hospitalisV3Front-{{ version }}-RELEASE/hospitalisV3Front/dist/
    dest: /home/wildfly/apache/webapp/front-office-{{ version }}

Same with this option remote_src: yes this task not works !! :frowning:

The message error is :

fatal: [my_host]: FAILED! => {“changed”: false, “cmd”: “/usr/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/bin/ssh -S none -o Port=22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null --out-format=<>%i %n%L /var/apps/hospitalis-frontoffice/3-29-0/fo/hospitalisV3Front-3-29-0-RELEASE/hospitalisV3Front/dist/ wildfly@my_host:/home/wildfly/apache/webapp/front-office-3-29-0”, “msg”: “Warning: Permanently added ‘my_host,10.25.23.220’ (ECDSA) to the list of known hosts.\r\nbash: rsync: command not found\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]\n”, “rc”: 12}

I specify that source and destination are on host destination and not in localhost.

Someone have any idea please ?!!!

Thanks for your help !! :slight_smile:

Regards,

It clearly says it:

rsync: command not found

So start by fixing that.

Dick