【发布时间】:2021-02-09 09:10:37
【问题描述】:
我在 Ubuntu Focal 上使用 chef-client 16.8, 刚刚发现它的输出和之前的有很大不同,
# chef-client -o some_cookbook -l info
...
[2021-01-14T09:45:49+00:00] INFO: Skipping removal of unused files from the cache
[2021-01-14T09:45:49+00:00] INFO: Running report handlers
[2021-01-14T09:45:49+00:00] INFO: Report handlers complete
[2021-01-14T09:45:49+00:00] INFO: Chef::Compliance::Runner#enabled?: Chef InSpec profiles? false
[2021-01-14T09:45:49+00:00] INFO: Chef::Compliance::Runner#enabled?: audit cookbook? false
[2021-01-14T09:45:49+00:00] INFO: Sending resource update report (run-id: 27e9fbeb-118d-4fc3-8de3-8f5f32eae15d)
上一个(chef-client 13.12.3)是这样的:
...
* execute[echo] action run (skipped due to only_if)
* file[/tmp/etc/apache2/certs/.changed] action nothing (skipped due to action :nothing)
Running handlers:
Running handlers complete
Chef Client finished, 0/13 resources updated in 06 seconds
显然,chef-client 16 不显示颜色报告,也不显示更新了多少资源的统计数据。
有谁知道如何设置 chef-client 16 来显示哪些资源被更改了?
【问题讨论】:
-
您只是以某种方式获取记录器,您需要
--force-formatter或查看您的 client.rb 设置。参见github.com/chef/chef/pull/9751。 -
@lamont 谢谢你,很好!让我安装一个厨师 16 并尝试一下。我认为没有人有这个问题,也没有期望得到答案。
-
@lamont 这就像一个魅力
-
@lamont 你能发表一个简单的答案吗?我会接受这个作为最终答案。
标签: chef-infra