【发布时间】:2023-04-07 01:04:01
【问题描述】:
我已经在 Amazon s3 中编写并呈现了几个盐状态(基础和支柱)。我想重新使用盐状态而不是再次编写盐状态。我想使用 packer 创建一个 AMI 映像,并将我从 s3 下载的 salt-states 应用到 Packer Builder EC2 实例。即使在 CentOS -7 机器上安装了 salt-minion,我也安装了 salt-master 服务,并通过以下命令同时启动了 salt-minion 和 salt-master。
cat > /etc/salt/minion.d/minion_id.conf <<'EOT' id: ${host} # id salt-minion id EOT
生成要连接的主节点的名称
cat > /etc/salt/minion.d/master_name.conf <<'EOT' master: localhost EOT
systemctl enable salt-minion
systemctl start salt-minion
systemctl enable salt-master
systemctl start salt-master
运行以下命令时,它不会列出任何小兵:
salt-key -L Accepted Keys: Denied Keys: Unaccepted Keys: Rejected Keys:
所以盐 'localhost-*' state.sls state.high_state 失败并出现错误:
"No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received"
这是因为没有从 salt-key 创建 minionid。
任何人都知道为什么 salt-key 没有与 salt-minion 一起显示,我如何通过运行从 s3 成功下载的现有 salt-state 来解决这个问题?
问候 普雷迪普
【问题讨论】:
标签: amazon-web-services salt salt-stack