Score:0

Ansible - How to optimize sending a file to a sub-network?

hu flag

I have a playbook that looks:

- name: Playbook para Copiar JRE
  hosts: all
  tasks:
    - name: Copia Arquivo JRE
      copy:
        src: jre.tar.gz
        dest: /home/pdv/sistema-loja/jre-new.tar.gz

And hosts:

[13]
0013-03.filial.local
0013-04.filial.local
0013-05.filial.local
0013-06.filial.local
0013-07.filial.local
0013-08.filial.local
0013-09.filial.local
0013-16.filial.local

Command:

ansible-playbook copia-jre.yml -u pdv --ask-pass

The group [13] is a remote network with limited bandwidth, so I want to optimize it by sending the file one time to the sub-network and reuse it.

I could choose ONE machine and then distribute.

Is it possible? how?

ar flag
Which distro and version of Linux are you using?
hu flag
All machines are Ubuntu 20.04, local and remote. ansible 2.9.6
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.