remote to remote host copy. using AWX

28 views
Skip to first unread message

Raj

unread,
Mar 1, 2021, 12:15:07 PM3/1/21
to Ansible Project
Hi All,

I am trying to copy file from remote to remote using below tasks. already I used fetch and copy module through control node. In my scenario as per security reason we won't copy to control node.

---
-  name: copy files from server A to server B,C,D...
    synchronize:
         src: /tmp
         dest: target servers path
    delegate_to: server A


TIA

Dick Visser

unread,
Mar 1, 2021, 12:35:07 PM3/1/21
to ansible...@googlegroups.com
And your question is....?
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/587b879e-5751-457b-87f0-2e2ba54145ebn%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Raja Natte

unread,
Mar 1, 2021, 12:36:47 PM3/1/21
to ansible...@googlegroups.com
Hi,

How to copy remote to remote  hosts.

Thanks 

Stefan Hornburg (Racke)

unread,
Mar 2, 2021, 3:40:23 PM3/2/21
to ansible...@googlegroups.com
On 3/1/21 6:36 PM, Raja Natte wrote:
> Hi,
>
> How to copy remote to remote  hosts.

Basically this should work:

- name: copy files from server_a to server B,C,D.
synchronize:
mode: push
src: "/tmp"
dest: ....
delegate_to: server_a
when: inventory_hostname != 'server_a'

Regards
Racke

>
> Thanks 
>
> On Mon, Mar 1, 2021, 12:34 PM Dick Visser <dick....@geant.org <mailto:dick....@geant.org>> wrote:
>
> And your question is....?
>
> On Mon, 1 Mar 2021 at 18:15, Raj <graj...@gmail.com <mailto:graj...@gmail.com>> wrote:
> >
> > Hi All,
> >
> > I am trying to copy file from remote to remote using below tasks. already I used fetch and copy module through
> control node. In my scenario as per security reason we won't copy to control node.
> >
> > ---
> > -  name: copy files from server A to server B,C,D...
> >     synchronize:
> >          src: /tmp
> >          dest: target servers path
> >     delegate_to: server A
> >
> >
> > TIA
> >
> > --
> > 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-project%2Bunsu...@googlegroups.com>.
> <https://groups.google.com/d/msgid/ansible-project/587b879e-5751-457b-87f0-2e2ba54145ebn%40googlegroups.com>.
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> 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-project%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwOCgsGgbS7Ws4N7W%2BAzMnun38_n%3DKA3T4SPqj_4xOYfrw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAL8fbwOCgsGgbS7Ws4N7W%2BAzMnun38_n%3DKA3T4SPqj_4xOYfrw%40mail.gmail.com>.
>
> --
> 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/CA%2BuTAOj1i%3DWnheOFngfeunDmAbuhKm01H3iUFoV3k3EDCu%3DkVw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CA%2BuTAOj1i%3DWnheOFngfeunDmAbuhKm01H3iUFoV3k3EDCu%3DkVw%40mail.gmail.com?utm_medium=email&utm_source=footer>.


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

OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages