LoginSignup
1
1

More than 5 years have passed since last update.

executeリーソースとbashリソースのある違い

Posted at

execute "go get github.com/github/hub"

bash "go get github.com/github/hub"

前者は動くのに後者はなぜか動かず、瞬間で処理が終了してしまっていた。エラーも吐かず正常終了しているように見えるので、原因がわからなかったが、公式ドキュメントを読み原因がわかった。

https://docs.chef.io/resource_execute.html
https://docs.chef.io/resource_bash.html

executeのnameの説明

name is the name of the resource block; when the command attribute is not specified as part of a recipe, name is also the command to be executed

bashのnameの説明

name is the name of the resource block; when the command attribute is not specified as part of a recipe, name is also the name of the command to be executed

ということで、bashの場合は、nameをコマンドとして取り扱ってくれるわけでないということのようです。

1
1
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
1
1