Ansible is easy to use
Copy files from the control host to the local (fetch), and then copy the files from the local to the remote control host copy
Copy the file from the control host to the local and extract it to the remote host fetch unarchive
Tasks:
The meaning of implementing tasks:
Trigger notify handlers
Tag tag
Variables of type facts
Custom variables in the command line of the ansible-playbook command if you want to specify more than one variable, you can boot with multiple-e
Two remote hosts (remote host) transfer data to each other: reference: https://www.cnblogs.com/xiaoxiaoleo/p/6626299.html
-name: Transfer file from ServerB to ServerA shell: scp-r / path/on/server_b node@ServerA:/path/on/server_a ignore_errors: True delegate_to: ServerB
Example:
Custom variable