Synchronize module failing

Hi Experts

One doubt with synchronize module

  • name: Unix common script deployment
    synchronize:
    src: “{{ playbook_dir }}/shellscript”
    Dest: /tmp/patch_impl
    delegation_to: all

In this ansible code it is failing because to run synchronize we need rsynch module in both control as well as managed nodes. But to overcome that can we use container method? Inside the requirement.txt can we add rsync module to build a image out it and use in the template?

My container file structure

  1. _build/requirement.txt
  2. Contanerfile
  3. krb5.conf
  4. pip.conf
  5. uib.repo

Regards
Prady

You can use whatever you want, as long as there will be a working rsync command on both control and managed nodes.

Dick

Thank you for your kind reply

No some target machine don’t have rsync installed.
What to do in that case ?

Regards

Hi,

Thank you for your kind reply

No some target machine don’t have rsync installed.
What to do in that case ?

install rsync on the target machines before using the synchronize
module. (For example using the ansible.builtin.package action:
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html.)

Best regards,
Felix

Thank you for your guidance …

Regards
Prady