我创建了一个带有主人和仆从的简单盐堆集群。然后,我在文件/ etc / salt / grains中将自定义的谷物添加到小黄人。
mykey: hello-key
我在母版中运行“ salt'*'grains.items”时确实看到了此键
...
localhost:
ip-172-31-24-109.us-west-2.compute.internal
lsb_distrib_codename:
CentOS Linux 7 (Core)
lsb_distrib_id:
CentOS Linux
machine_id:
b30d0f2110ac3807b210c19ede3ce88f
manufacturer:
Xen
master:
ec2-54-186-104-181.us-west-2.compute.amazonaws.com
mdadm:
mem_total:
15883
mykey:
hello-key
...
现在连接的部分是当我尝试通过自定义的谷物来定位该爪牙时,它在所有其他方式都起作用时不起作用!
[root@ip-172-31-28-130 ~]# salt '*' saltutil.refresh_modules
ip-172-31-24-109.us-west-2.compute.internal:
True
[root@ip-172-31-28-130 ~]# salt '*' test.ping
ip-172-31-24-109.us-west-2.compute.internal:
True
[root@ip-172-31-28-130 ~]# salt -G 'mem_total:*' test.ping
ip-172-31-24-109.us-west-2.compute.internal:
True
[root@ip-172-31-28-130 ~]# salt -G 'mykey:hello-key' test.ping
ip-172-31-24-109.us-west-2.compute.internal:
Minion did not return. [No response]
有人有想法或建议吗?
答案 0 :(得分:0)
看来您确实有连接问题,而不是针对性问题。 您的定位是可以的,否则,您会收到类似
的消息$ salt 'minion' test.ping
No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received