STAE usage in saltstack

Source: Internet
Author: User

# Salt '*' state. SLS httpd

This command will first find httpd in the directory/srv/salt. SLS (written in yml syntax) file. If yes, the content of the Installation File is executed. If not, locate init in the/srv/salt/httpd directory. SLS, find the installation file for execution, if not, an error is reported;


# Salt '*' state. SLS httpd. Install

Run the command according to the file/srv/salt/httpd/install. SLS. If no file is available, an error is returned;

[[Email protected] _ 2 salt] # Cat. /httpd/install. slS install_httpd: PKG:-installed-Name: HTTPd service:-running-require:-PKG: httpd #/root/tt.txt: # file. managed: #-Source: salt: // file/tt.txt #-user: Root #-group: Root #-mode: 755


#Salt '*' state. highstate

According to the file/srv/salt/top. SLS into other *. SLS content in order to execute, if not, an error is reported;

 
[[Email protected] _ 2 ~] # Cat/srv/salt/top. slS base: '*':-HTTP #-httpd. install-users-files. EXT-files-second 'OS: centos':-Match: grain-centos-iptables 'kernel: Linux ':-Match: grain-Kernel



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.