如何使小黄人生成新密钥


14

我在玩盐,而我的问题是从Amazon EC2 AMI启动实例会导致Minion键相同。如何刷新单个奴才以获取新的身份(密钥)?

Answers:


21
  1. 停止小兵服务。

    service salt-minion stop
    
  2. 删除旧身份

    rm /etc/salt/pki/minion/minion.pem
    rm /etc/salt/pki/minion/minion.pub
    cat /dev/null > /etc/salt/minion_id
    
  3. 确保盐将在启动时开始

    chkconfig salt-minion on
    
  4. 创建一个新的AMI



0

基于user325017的答案。

我将其改编为Ubuntu Bionic Beaver 18.04,因为它已系统化:

#!/usr/bin/env bash

systemctl stop salt-minion
rm /etc/salt/pki/minion/minion.pem
rm /etc/salt/pki/minion/minion.pub
cat /dev/null > /etc/salt/minion_id
systemctl enable salt-minion
systemctl start salt-minion

-1

在Windows的@ user325017答案之后,通过以下步骤调整步骤2:

删除C:\ salt \ conf \ pki \ minion \ minion.pem删除C:\ salt \ conf \ pki \ minion \ minion.pub编辑c:\ salt \ conf \ minion,并用“ id:”更新该行


这应该是对您所指的答案的评论。
zagrimsan
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.