chef-client --version
Chef: 14.3.37
厨师客户端通过以下命令运行
chef-client -c <file.rb> -j <file.json> -E <env> 2>&1 > file.log
执行file.log
后包含以下有关当前运行的已解决食谱列表的行:
[time] INFO: Loading cookbooks [[email protected], [email protected], [email protected], [email protected], [email protected]]
通过chef-client
的哪个命令(不是knife
!),我可以提取带有版本的菜谱列表?
解析日志不是个好主意。无法配置knife
-秒。
如果要访问扩展配方运行清单,请使用node['recipes']
。
如果您对节点的角色感兴趣,请使用node['roles']