Saltstack module Learning to copy the files and directories on the master server to the Minion server

Source: Internet
Author: User
Tags saltstack

I. Cp.get_file implementing files from the master side to the Minion server
Cp.get_file
1. Modify/etc/salt/master to specify the root directory of the server's work
File-roots:
-Base:
/srv/salt (default path, can be specified)
2. Create a Directory
Mkdir/srv/salt
3. Copy the files that need to be copied to the working directory
Cp-ra Souce_file/srv/salt
4. Execute cp.get_file command
Salt ' * ' Cp.get_file salt://path/to/file/minion/dest/file
#说明
1) salt://the first '/' root specified for profile base, and the second is a path delimiter
2) Copy to the target must give the file name, can not only give the directory, or error, such as
3) Common options gzip compression (level 1-9), Makedirs=booltype (true| False), whether to create a directory
Salt ' * ' cp.get_file salt://path/to/file/minion/dst/newfile gzip=5 makedirs=true
5. After successful execution, the Minion ID and copy path are returned, as

6. Minion node view corresponding path


Saltstack module Learning to copy the files and directories on the master server to the Minion server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.