Ask Your Question
0

puppet apply getting failed

asked 2016-02-09 02:18:16 -0500

premkumar.unix@gmail.com gravatar image

updated 2016-02-09 09:24:19 -0500

root@lin9888 [/etc/puppet/modules/root-httpdpkg/manifests] # more install.pp
class httpdpkg::install inherits httpdpkg {

  package { 'httpd':
    ensure => installed,
  }
}
root@lin9888 [/etc/puppet/modules/root-httpdpkg/manifests] # tail -5 init.pp
# Copyright 2016 Your name here, unless otherwise noted.
#
class httpdpkg {
  include httpdpkg::install
}
root@lin9888 [/etc/puppet/modules/root-httpdpkg/manifests] #
root@lin9888 [/etc/puppet/modules/root-httpdpkg/manifests] # puppet apply --noop init.pp
Notice: Compiled catalog for lin9888.example.com in environment production in 0.03 seconds
Notice: Finished catalog run in 0.36 seconds
root@lin9888 [/etc/puppet/modules/root-httpdpkg/manifests] # puppet apply -e init.pp
Error: Could not parse for environment production: Syntax error at '.' at line 1 on node lin9888.example.com
Error: Could not parse for environment production: Syntax error at '.' at line 1 on node lin9888.example.com
root@lin9888 [/etc/puppet/modules/root-httpdpkg/manifests]
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-02-09 06:49:10 -0500

jon6000 gravatar image

updated 2016-02-09 06:49:37 -0500

It's a bit tricky to see what's going on, but I think you should drop the -e flag from your second 'puppet apply' statement. That flag expects you to provide some Puppet code directly as an argument, rather than specifying a file.

Jon

edit flag offensive delete link more

Comments

1

I concur with Jon above, if you were trying to manually put in a puppet 'expression' that is when you use the -e flag. puppet apply -e "notify{'hello world!':}" If you are applying a manifest, you drop the -e puppet apply ~/sample.pp

DarylW gravatar imageDarylW ( 2016-02-09 18:34: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: 2016-02-09 02:18:16 -0500

Seen: 105 times

Last updated: Feb 09 '16