Ask Your Question
0

"Could not parse for environment production" error seen while running "puppet apply <manifest-file>

asked 2015-01-02 04:53:53 -0500

vinnu gravatar image

updated 2015-01-02 15:09:31 -0500

GregLarkin gravatar image

Hello all, I am using puppet version "3.7.3". I just started to use puppet and trying out my first hello.pp. Contents of hello.pp :

root@MyHost:~# cat RUBY/hello.pp 
notify{' Hey Thats cool stuff!'}
root@MyHost:~# puppet --version
3.7.3
root@MyHost:~# puppet apply RUBY/hello.pp 
Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
   (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')
Error: Could not parse for environment production: Syntax error at '}' at /root/RUBY/hello.pp:1 on node MyHost
Error: Could not parse for environment production: Syntax error at '}' at /root/RUBY/hello.pp:1 on node MyHost

I am assuming this could be because of the environment setting since the manifest file contains bare minimum configuration. However i could not figure out the issue. Any help is greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-01-02 15:10:17 -0500

GregLarkin gravatar image

updated 2015-01-02 15:10:32 -0500

Check the syntax of the notify resource in your hello.pp file. I think you'll find that there is something missing, and once you add it, your puppet apply command will work.

edit flag offensive delete link more

Comments

Thanks Greg. How silly it was to miss out the colon.

vinnu gravatar imagevinnu ( 2015-01-03 00:43:57 -0500 )edit

They'll get you every time! :)

GregLarkin gravatar imageGregLarkin ( 2015-01-06 23:25:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-02 04:53:53 -0500

Seen: 2,506 times

Last updated: Jan 02 '15