salt-master和salt-minion安装方法点击此链接
http://charlie928.blog.51cto.com/3741218/1344069
1.创建top.sls入口文件
cd /srv/salt vi top.sls base: '*': - conf.snmpd
vi conf/snmpd.sls net-snmp: pkg: - installed - name: net-snmp service: - name: snmpd - running - reload: True - watch: - file: /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf: file.managed: - source: salt://snmp/snmpd.conf - user: root - gourp: root - mode: 644 - backup: minion
3.拷贝配置好的snmpd.conf文件到设定的目录
cp /etc/snmp/snmpd.conf /srv/salt/snmp/ ll snmp/snmpd.conf -rw------- 1 root root 18900 Mar 13 02:40 snmp/snmpd.conf4.
4.执行安装snmpd
8.查看目录结构