ruby - Unexpected tASSOC, in a chef recipe. What's wrong? -


i keep getting error when try use environment attribute in chef recipe:

git name         repository repo_url          revision "master"         environment  { 'var' => 'whatever' }         action :sync       end 

the error :

error: /tmp/vagrant-chef-3/chef-solo-3/cookbooks/jandj/recipes/git_repo.rb:11: syntax error, unexpected tassoc, expecting '}' ==> default:            environment  { 'var' => 'whatever' } 

i copied example chef docs here

the correct syntax either

environment({ 'var' => 'whatever' }) 

or

environment 'var' => 'whatever' 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -