简体   繁体   English

如何将节点添加到可以访问Chef服务器上的数据包的客户端列表?

[英]How to add node to list of clients that can access a data bag on a Chef Server?

I want/need one of my nodes to access a data bag on my chef server. 我希望/需要我的一个节点访问我的厨师服务器上的数据包。 The purpose is to get a decrypted ssh key so i can clone from a private repo. 目的是获得一个解密的ssh密钥,以便我可以从一个私人仓库克隆。 I've been trying many variations of 我一直在尝试很多变种

knife vault update data_bag item -A 'name-of-node'

But I do not see the node come up on the list of clients with access. 但我没有看到该节点出现在具有访问权限的客户端列表中。

What am I doing wrong in this command or need to do to get this to work? 我在这个命令中做错了什么或者需要做些什么才能使它工作? I've been following this guide , but I'm not using roles. 我一直在关注这个指南 ,但我没有使用角色。

Figured out that this command works for updating, but it basically adds all nodes and users. 弄清楚这个命令适用于更新,但它基本上添加了所有节点和用户。 Would prefer a more precise answer for just an individual node if someone has one. 如果有人拥有一个节点,则更愿意为单个节点提供更精确的答案。

knife vault update data_bag item --search '*:*' --admins me --mode client

https://github.com/chef/chef-vault/issues/181 https://github.com/chef/chef-vault/issues/181

https://github.com/chef/chef-vault/blob/master/THEORY.md https://github.com/chef/chef-vault/blob/master/THEORY.md

EDIT: 编辑:

As the user in the comments mentioned, this too works and is more correct. 作为评论中提到的用户,这也是有效的,也更正确。

knife vault create data_bag item '{"itemname":"securepass"}' --search 'name:my-node-name' --admins me --mode client 刀库创建data_bag项'{“itemname”:“securepass”}' - 搜索'名称:my-node-name'--admins me --mode client

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在不将节点注册到服务器的情况下应用厨师配置? - How can I apply chef configuration without registering the node in the server? 如何在Chef的数据包中对“源”进行身份验证? - How do I have some authentication around “source” in Chef's data bag? 无法使用厨师属性检索加密数据包的数据包项目 - Unable to retrieve databag items for a encrypted data bag using chef attributes AWS Chef节点无法执行Chef运行列表 - Aws chef node not able to execute chef run list Elasticsearch访问策略-允许从客户端读取和从Node.js服务器读取/写入 - Elasticsearch access policy - allow read from clients and read/write from Node.js server 如何使用刀编辑ec2节点的chef属性 - How can I edit a chef attribute of an ec2 node using knife 消息队列,可以与Node.js一起使用,以将数据发送到多个客户端 - Message queue which can be used with Node.js for sending data to multiple clients 如何为Chef Server设置Chef管理控制台(使用AWS OpsWorks旋转已有一个) - How to setup Chef management console for Chef Server(existing one spun up using AWS OpsWorks) Chef调配配方以创建AWS安全组,如何从服务器vs Chef客户端运行 - chef provisioning recipe to make AWS security groups, how to run from server vs chef client 更改Chef服务器地址 - Change Chef Server Address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM