Ask Your Question

Could not parse for environment test_environment

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

Chutki gravatar image


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
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

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"

edit flag offensive delete link more

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


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


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

Seen: 140 times

Last updated: May 26 '15