一、前言

默认salt客户端把执行结果发送给salt mater,然而还可以发送给redis、mongodb... 详见官网

https://docs.saltstack.com/en/2016.11/ref/returners/ (以下以redis为例)

 

二、配置

客户端需要安装python-redis

pip install redis

配置说明(添加在salt-master和salt-client配置文件中都可以)

redis.db: '0'
redis.host: 'salt'
redis.port: 6379

疑问 redis.host写ip不生效(example -> redis.host: '192.168.1.10')现在不得不在client写/etc/hosts文件

 

三、执行

salt '*' test.ping --return redis

 

ps: salt-minion 2016.11.4 (Carbon)

相关文章:

  • 2021-12-30
  • 2021-05-30
  • 2021-09-01
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-02-27
  • 2021-07-31
  • 2022-12-23
相关资源
相似解决方案