Skip to content

chefでプラットフォームごとに処理を変える

mechamogera edited this page Sep 27, 2012 · 2 revisions
  • 以下のような感じでプラットフォームごとに処理を変えられるらしい

  • Recipes - Chef - Opscode Open Source Wiki参照

  • プラットフォーム別に処理

  • node[:platform_version]でバージョンも取れる

case node[:platform]
when "ubuntu"
when "centos", "redhat", "amazon"
end
  • メソッドで判定もできる
if platform?("ubuntu")
end
Clone this wiki locally