Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ansible is easy to use

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report