SaltStack之salt-key管理
生活随笔
收集整理的这篇文章主要介绍了
SaltStack之salt-key管理
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
SaltStack之salt-key管理
环境: OS: CentOS6.5 x64 Master: salt-master.example.com Minion: salt-minion1.example.com salt-minion2.example.com
参考文档: http://docs.saltstack.cn/zh_CN/latest/topics/tutorials/walkthrough.html#minion-id-generation
1.删除salt-key 删除指定minion的key salt-key -d salt-minion2.example.com 删除所有minion的key salt-key -D -y
2.minion配置文件指定salt-key minion配置文件直接指定salt-key(通过id:字段),优先级最高
当minion启动后,它会产生一个id值,除非已经在之前的运行过程中产生过并且缓存在配置路径下,默认是/etc/salt/minion_id 如果,minion_id己经生成,则优先读取该缓存,如果发现有重名的,可以直接删除/etc/salt/minion_id后重启minion服务,这里便会根据salt-key生成规则重新生成
3.查看salt-key 指纹信息和内容
4.生成新的key-pair root@salt-master:~#salt-key --auto-create --gen-signature Generating new signing key-pair master_sign.* in /etc/salt/pki/master Using public-key /etc/salt/pki/master/master.pub Using private-key /etc/salt/pki/master/master_sign.pem
5.master自动接受所有salt-key Master端配置文件/etc/salt/master # Enable auto_accept, this setting will automatically accept all incoming # public keys from the minions. Note that this is insecure. auto_accept: True
环境: OS: CentOS6.5 x64 Master: salt-master.example.com Minion: salt-minion1.example.com salt-minion2.example.com
参考文档: http://docs.saltstack.cn/zh_CN/latest/topics/tutorials/walkthrough.html#minion-id-generation
1.删除salt-key 删除指定minion的key salt-key -d salt-minion2.example.com 删除所有minion的key salt-key -D -y
2.minion配置文件指定salt-key minion配置文件直接指定salt-key(通过id:字段),优先级最高
当minion启动后,它会产生一个id值,除非已经在之前的运行过程中产生过并且缓存在配置路径下,默认是/etc/salt/minion_id 如果,minion_id己经生成,则优先读取该缓存,如果发现有重名的,可以直接删除/etc/salt/minion_id后重启minion服务,这里便会根据salt-key生成规则重新生成
3.查看salt-key 指纹信息和内容
4.生成新的key-pair root@salt-master:~#salt-key --auto-create --gen-signature Generating new signing key-pair master_sign.* in /etc/salt/pki/master Using public-key /etc/salt/pki/master/master.pub Using private-key /etc/salt/pki/master/master_sign.pem
5.master自动接受所有salt-key Master端配置文件/etc/salt/master # Enable auto_accept, this setting will automatically accept all incoming # public keys from the minions. Note that this is insecure. auto_accept: True
转载于:https://www.cnblogs.com/lixuebin/p/10814294.html
总结
以上是生活随笔为你收集整理的SaltStack之salt-key管理的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: VC中实现GCC的2个比较常用的位运算函
- 下一篇: 276.Paint Fence