AV
If no, it will search for src at originating/controller machine.
If yes, it will go to the remote/target machine for the src.
Size: a a a
AV
AV
А
AV
А
AV
- hosts: hostA
become: yes
tasks:
- name: Transfer file from ServerA to ServerB
copy:
src: /путь/
dest: /путь/test.txt
remote_src: yes
delegate_to: hostB
А
G
G
[cluster_1]
host1 ansible_host=1.1.1.1
host2 ansible_host=1.1.1.2
host3 ansible_host=1.1.1.3
[cluster_2]
host4 ansible_host=1.1.2.1
host5 ansible_host=1.1.2.2
host6 ansible_host=1.1.2.3
[web_group:children]
cluster_1
cluster_2
[db_group:children]
cluster_1
[log_stash]
host3
[load_balancers]
host1
G
yaml
all:
hosts:
host1:
ansible_host=1.1.1.1
host2:
ansible_host=1.1.1.2
host3:
ansible_host=1.1.1.3
host4:
ansible_host=1.1.2.1
host5:
ansible_host=1.1.2.2
host6:
ansible_host=1.1.2.3
children:
cluster_1:
host1:
host2:
host3:
cluster_2:
host4:
host5:
host6:
web_group:
children:
cluster_1:
cluster_2:
db_group:
children:
cluster_1:
log_stash:
children:
host3:
load_balancers:
children:
host1
G
MY
G
G
G
G
cluster:
children:
- node1
- node2
G
dv