当我尝试在厨师食谱中使用environment属性时,我一直收到错误:
git name do
repository repo_url
revision "master"
environment { 'VAR' => 'whatever' }
action :sync
end错误是:
ERROR: /tmp/vagrant-chef-3/chef-solo-3/cookbooks/JandJ/recipes/git_repo.rb:11: syntax error, unexpected tASSOC, expecting '}'
==> default: environment { 'VAR' => 'whatever' }我复制了chef docs here中的示例
发布于 2015-06-10 23:42:22
正确的语法应该是
environment({ 'VAR' => 'whatever' })或
environment 'VAR' => 'whatever'https://stackoverflow.com/questions/30760561
复制相似问题