【问题标题】:Chef - puts message in end of chef-client run?厨师 - 将消息放在厨师客户端运行的末尾?
【发布时间】:2019-12-20 17:18:22
【问题描述】:

是否可以在厨师客户端运行结束时打印出一条消息?比如:

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

Attention: blablabla

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

提前谢谢你

【问题讨论】:

    标签: chef-infra puts


    【解决方案1】:

    你可以使用event handlers,它看起来像:

    Chef.event_handler do
      on :run_completed do
        puts "Attention: blablabla"
      end
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多