0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Chefのデバックのやり方

Last updated at Posted at 2021-03-12

Chefの情報がネットにも少なかったので、ひとつメモがわりに。。

cookbookなどで定義した値が実際何が入っているかを確認したいとき
デバックをやるのですが、やり方ですが、
Chef::Log.debugを追加して
chefを実行するだけです。

cookbook/
test = "hello"
Chef::Log.debug "test=#{test}"
cat chef-client.log | egrep "test"

などで

ログをみてみると

test=hello

と表示されるので、
これで色々調査ができます!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?