[root@angel01 ~]# salt '*' test.ping
angel01.i.fdmdns.com:
True
angel02.i.fdmdns.com:
True
表示成功了!
问题集合
问题1
ImportError: No module named salt.scripts
yum 的情况下salt的模块都安装在python2.6 进入/etc/init.d/salte-master进行修改
1234
批量修改命令
sed -i "s/^#\!\/usr\/bin\/python$/#\!\/usr\/bin\/python2.6/g" /usr/bin/salt-*
批量修改启动命令
sed -i "s/^PYTHON=\/usr\/bin\/python$/PYTHON=\/usr\/bin\/python2.6/g" /etc/init.d/salt-*
问题2
[root@angel01 ~]# salt ‘angel01.i.fdmdns.com’ test.ping
[ERROR ] Salt request timed out. If this error persists, worker_threads may need to be increased.
Failed to authenticate, is this user permitted to execute commands?
由于修改过启动配置文件直接读取/mnt/config/salt/导致,最后改成/etc/salt/master 添加include解决