Copy a folder from remote host to local using Ansible.

27 views
Skip to first unread message

Divya Punna

unread,
May 19, 2020, 8:41:30 AM5/19/20
to Ansible Project
Can anyone help/suggest on how to copy a folder from remote host to local using Ansible? Appreciate any quick help on this

Stefan Hornburg (Racke)

unread,
May 19, 2020, 9:36:25 AM5/19/20
to ansible...@googlegroups.com
On 5/19/20 2:41 PM, Divya Punna wrote:
> Can anyone help/suggest on how to copy a folder from remote host to local using Ansible? Appreciate any quick help on this
>

What about synchronize module?

Regards
Racke

> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/3988deab-7da0-454d-b536-3d09e58341b5%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/3988deab-7da0-454d-b536-3d09e58341b5%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc

Vladimir Botka

unread,
May 19, 2020, 9:55:51 AM5/19/20
to Divya Punna, ansible...@googlegroups.com
On Tue, 19 May 2020 05:41:30 -0700 (PDT)
Divya Punna <kumari....@gmail.com> wrote:

> copy a folder from remote host to local

Try

- hosts: remote_host
tasks:
- synchronize:
mode: pull
src: "{{ dir_on_remote_host }}"
dest: "{{ dir_on_localhost }}"
Reply all
Reply to author
Forward
0 new messages