1、拷贝文件到客户端
# salt 'slaver.test.com' cp.get_file salt://apache.sls /tmp/cp.txt
2、拷贝目录到客户端
# salt 'slaver.test.com' cp.get_dir salt://test /tmp
3、显示存活的客户端
# salt-run manage.up
4、命令下执行服务端的脚本
# vim /srv/salt/test/shell.sh
echo "hello salt,thank u for your accompanying" > /tmp/shell.txt
# salt -G 'env:test' cmd.script salt://test/shell.sh
5、执行多个ip用-L
# salt -L '10.59.0.97,10.59.0.62' cmd.run 'date'
转载于:https://my.oschina.net/guiguketang/blog/1858346