Ask Your Question
0

Could not parse for environment test_environment

asked 2015-05-26 06:48:26 -0500

Chutki gravatar image

Hi,

I am getting below error when I run "puppet apply -e" option but when run with "puppet apply --test" it is working.

 puppet apply -e /etc/puppetlabs/puppet/modules/dep_test.pp
Error: Could not parse for environment test_environment: Syntax error at '/' at line 1 on node server.puppet.com
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-05-26 08:32:09 -0500

slk gravatar image

If I am not mistaken "-e" option for puppet apply needs puppet code ie puppet apply -e "include apache"

https://docs.puppetlabs.com/reference...

edit flag offensive delete link more
0

answered 2015-05-26 18:53:32 -0500

Yes so the command you need is:

puppet apply /etc/puppetlabs/puppet/modules/dep_test.pp
edit flag offensive delete link more

Comments

No, I tried many times with option "puppet apply -e" it worked. need to know why started throwing error.

Chutki gravatar imageChutki ( 2015-05-26 19:21:27 -0500 )edit

Probably because last time you tried using puppet apply -e you weren't passing in a full path? It's throwing the error due to the presence of the '/' character in your full path. As mentioned by slk above, the puppet apply -e command expects valid puppet code to follow the -e, not a filename.

Alex Harvey gravatar imageAlex Harvey ( 2015-05-26 19:47:13 -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-05-26 06:48:26 -0500

Seen: 123 times

Last updated: May 26 '15