【问题标题】:How to get a full path of the running cookbook in the RightScale chef recipe?如何在 RightScale 厨师食谱中获取正在运行的食谱的完整路径?
【发布时间】:2012-12-29 05:37:17
【问题描述】:

从我当前正在执行的食谱食谱中,我想访问它在我的执行机器上的“当前”位置。

我需要这个来访问它的缓存目录结构。

我感觉它位于“node[]”内的某个地方,但我根本找不到任何关于其结构的文档。

有什么建议吗?

谢谢

【问题讨论】:

    标签: chef-infra chef-recipe rightscale


    【解决方案1】:

    刚刚通过检查“run_context”实例找到了解决方案:

    ruby_block "reload_client_config" do
      block do
        puts "HERE!!!!!  -> " + run_context.cookbook_collection[cookbook_name].root_dir
      end
      action :create
    end
    

    看到这个帖子后我想到了 - Get deployed cookbook version

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-06
      • 2019-01-29
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多