根据官网步骤操作
master:
[root@linux-node1 ~]# salt 'linux-node2.example.com' test.ping --return mysql
linux-node2.example.com:
    Truemysql> use salt
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> select * from salt_returns;
Empty set (0.00 sec)minion端查看log显示:
[root@linux-node2 ~]# tail -f /var/log/salt/minion 
2018-08-03 04:40:26,483 [salt.minion                                                      :1725][ERROR   ][1811] Returner mysql.returner could not be loaded: 'mysql' __virtual__ returned False: Could not import mysql returner; mysql python client is not installed. master和minion端都有安装
[root@linux-node2 ~]#  yum install -y MySQL-python.x86_64
Failed to set locale, defaulting to CLoaded plugins: fastestmirror
Setting up Install Process
---------------------master和minion配置:mysql.host: '172.20.46.93'
mysql.user: 'salt'
mysql.pass: 'salt'
mysql.db: 'salt'
mysql.port: 3306求大神看下为什么会这样!网上也没找到有报这个错的!感谢