LoginSignup
1
1

More than 5 years have passed since last update.

Chef bashリソースでコマンドが実行されない場合

Posted at

Chefのbashリソースではプロパティにcodeを使い、
executeリソースではプロパティにcommandを使います。

bash
bash 'myscript' do
  code 'echo bash code'
end
execute
execute 'myscript' do
  command 'echo execute command'
end

ここでbashリソースにcommandプロパティを使ってしまうと、
コマンドが実行されないうえwarnメッセージが出まくります。

bash+command
bash 'myscript' do
  command 'echo bash command'
end

Chef 13以降はbashリソースがcommandを受け取るとエラーになるようです。
https://github.com/chef/chef/issues/3244

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