LoginSignup
0
0

More than 5 years have passed since last update.

[ chef ] run_listの中身を確認する

Posted at

TODO

  • 例えばcookbookAのレシピ001がrun_listにあったらcookbookBのレシピ001をインクルードし、cookbookAのレシピ002がrun_listにあったらcookbookBのレシピ002をインクルードするような条件分岐をcookbookCのレシピで書きたい

example

cookbookC/recipes/sample.rb
include_recipe 'cookbookB::001' if node.recipes.include?('cookbookA::001')
include_recipe 'cookbookB::002' if node.recipes.include?('cookbookA::002')

node.recipes.include?を使う。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0