salt

#从minion到master /var/cache/salt/master/minions/node4.xk.com/files
salt node* cp.push_dir '/etc' upload_path='/tmp' glob='*.conf'

#从master到minion
salt-cp '*' /etc/cups/cups-files.conf /tmp

#从master到minion,ip.txt在/srv/salt/cmdbconf中
salt "*" cp.get_file salt://cmdbconf/ip.txt /tmp
file_roots:
base:
- /srv/salt

#执行命令
salt -L "`cat ip.txt`" cmd.run "ifconfig"

原文地址:https://www.cnblogs.com/qqran/p/15302306.html