centos7 salt operation command

After first installation salt, configuration information necessary to write each minion

FIG minion (colon intermediate spaces)

 

 FIG master (all network interface address)

 

Start node

systemctl   restart  salt-master

systemctl   restart  salt-minion

master agree to the following command

 

 

The basic use of salt

salt '*' cmd.run 'touch 1.txt' command line: cmd.run 

salt '*' cmd.script salt: //1.sh This script must be in the / srv / salt directory. Do distribute to perform on each machine

state usage (equivalent to a script template to pass parameters)

Directory: / var / salt following file write sls

 

 The installation is complete

 

include usage

First create a web_install in / srv / salt / directory

1. Preparation of the installation files in the directory nginx.sls

2. Create a directory in the file contents are as follows vim init.sls

 

extend usage

 

Guess you like

Origin www.cnblogs.com/Su-per-man/p/12605688.html