常用命令

*cp.get_file  拷贝master上的文件到客户端

如:salt 'client.wyp.com' cp.get_file salt://1.txt /tmp/wyp.txt

说明:把1.txt拷贝到/tmp/下,并改名为wyp.txt


*cp.get_dir 拷贝目录和目录下所有的文件到客户端

如:salt '*' cp.get_dir salt://test/conf  /tmp/    //会自动在客户端创建conf目录,所以后面不要加conf,如果写成 /tmp/conf/  则会在/tmp/conf/目录下又创建conf


*salt-run manage.up  显示存活的minion远程客户端


*salt 'client.wyp.com' cmd.script salt://test/1.sh  命令行下执行master上的shell脚本