配置普通用户可以运行saltstack的模块
生活随笔
收集整理的這篇文章主要介紹了
配置普通用户可以运行saltstack的模块
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
client_acl 配置使用
1.概述:開啟對系統上非root的系統用戶在master上可以執行特殊的模塊。這些模塊名可以使用正則表達式來表示,不能指定對哪些minion執行命令。執行命令只需要切換到具體的用戶即可 不需要認證。 2.開啟配置: vim /etc/salt/master client_acl:test:- test.ping- cmd.*
配置解釋:test用戶只能執行test.ping 和cmd模塊的命令
3.重啟salt-master服務
service salt-mater restart
4.驗證
[test@localhost salt]$ salt '*' test.ping 192.168.138.128:True
報錯總結
1.[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/master?
解決:
chmod 777 /var/log/salt/master
2.Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
這里是因為master的interface的地址不是0.0.0.0 導致的。改為0.0.0.0 重啟服務就不報錯了,這個好像是個bug
轉載于:https://www.cnblogs.com/fujinzhou/p/5795697.html
總結
以上是生活随笔為你收集整理的配置普通用户可以运行saltstack的模块的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 创建自己的Vagrant box
- 下一篇: windows下 sbulime tex