Saltstack Management Starts Here

Source: Internet
Author: User
Tags artifactory saltstack

Modules1: View all Module list: Salt ' jcfx-4 ' sys.list_modules

Jcfx-4:
-ACL
-Aliases
-Alternatives
-Apache
-Archive
-Artifactory
-At
-Beacons
-BIGIP
-Blockdev
-Bridge
-Btrfs

2: View all Functionsalt ' jcfx-4 ' sys.list_functions CP for the specified module

Jcfx-4:
-Cp.cache_dir
-Cp.cache_file
-Cp.cache_files
-Cp.cache_local_file
-Cp.cache_master
-Cp.get_dir
-Cp.get_file
-Cp.get_file_str
-Cp.get_template
-Cp.get_url
-Cp.hash_file
-Cp.is_cached
-Cp.list_master
-Cp.list_master_dirs
-Cp.list_master_symlinks
-Cp.list_minion
-Cp.list_states
-Cp.push
-Cp.push_dir
-CP.RECV

3: View the specified module usage: Salt ' jcfx-4 ' Sys.doc cp.get_file

Cp.get_file:

Used to get a single file from the Salt master

CLI Example:

Salt ' * ' Cp.get_file salt://path/to/file/minion/dest

Template rendering can be enabled on both the source and destination file
Names:

Salt ' * ' Cp.get_file "SALT://{{GRAINS.OS}}/VIMRC"/ETC/VIMRC Template=jinja

This example would instruct all Salt minions to download the VIMRC from a
Directory with the same name as their OS grain and copy it TO/ETC/VIMRC

For larger files, the Cp.get_file module also supports gzip compression.
Because gzip-cpu-intensive, this should only being used in scenarios where
The compression ratio is very high (e.g. pretty-printed JSON or YAML
files).

Use the *gzip* named argument to enable it. Valid values is 1..9, where 1
Is the lightest compression and 9 the heaviest. 1 uses the least CPU on
The Master (and Minion), 9 uses the most.

States1: View all States List: Salt ' jcfx-4 ' sys.list_state_modules

Jcfx-4:
-ACL
-Alias
-Alternatives
-Apache
-Archive
-Artifactory
-At
-Beacon
-Blockdev
-Buildout
-Cloud
-cmd
-composer
-Cron

2: View all Functionsalt ' jcfx-4 ' sys.list_state_functions file for the specified states

Jcfx-4:
-File.absent
-file.accumulated
-File.append
-File.blockreplace
-File.comment
-File.Copy
-File.directory
-File.exists
-File.line
-File.managed
-File.missing
-File.mknod
-File.mod_run_check_cmd
-File.patch
-File.prepend
-File.recurse
-File.rename
-File.replace
-File.serialize
-File.symlink
-File.touch
-File.uncomment

3: View specified states usage: Salt ' jcfx-4 ' sys.state_doc file output slightly; 4: View states Specify function usage: Salt ' jcfx-4 ' Sys.state_doc file.managed output slightly;

Saltstack Management Starts Here

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.