Chef-将消息放入Chef-client运行结束吗?

问题描述 投票:0回答:1

是否可以在厨师客户运行结束时打印出一条消息?类似于:

######################

Attention: blablabla

######################
Chef Client finished, 19/222 resources updated in 18 seconds

提前谢谢您

chef puts
1个回答
0
投票

您可以洗净event handlers,看起来像这样:

Chef.event_handler do
  on :run_completed do
    puts "Attention: blablabla"
  end
end
© www.soinside.com 2019 - 2024. All rights reserved.