FAQ
Hi, ppl,

I m following the puppet cookbook tutorial. On page 167 to 169 Managing
Apache Servers. When I add the:

apache::snippet { "site-specific.conf": }

I got the error of the title: Could not parse for environment production:
Syntax error at '{'; expected '}' at /etc/puppet/manifests/nodes.pp:3.

Here is my manifests

node.pp
/etc/puppet/manifests/node.pp

node 'thegrid.geofusion' {
include apache
include apache::snippet { site-test.conf },
}

init.pp
/etc/puppet/modules/apache/manifests/init.pp

class apache {

package { "apache2-mpm-prefork": ensure => installed }

service { "apache2":
enable => true,
ensure => running,
require => Package["apache2-mpm-prefork"],
}

file { "/etc/apache2/logs":
ensure => directory,
require => Package["apache2-mpm-prefork"],
}

file { "/etc/apache2/conf.d/name-based-vhosts.conf":
content => "NameVirtualHost *:80",
require => Package["apache2-mpm-prefork"],
notify => Service["apache2"],
}

define snippet() {
file { "/etc/apache2/conf.d/${name}":
source => "puppet:///modules/apache/${name}",
notify => Service["apache2"],
}
}
}





--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/T5Fu4pZlakMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Calvin Walton at Oct 30, 2012 at 2:11 pm

    On Tue, 2012-10-30 at 06:19 -0700, Havary wrote:
    Hi, ppl,

    I m following the puppet cookbook tutorial. On page 167 to 169 Managing
    Apache Servers. When I add the:

    apache::snippet { "site-specific.conf": }

    I got the error of the title: Could not parse for environment production:
    Syntax error at '{'; expected '}' at /etc/puppet/manifests/nodes.pp:3.

    Here is my manifests

    node.pp
    /etc/puppet/manifests/node.pp

    node 'thegrid.geofusion' {
    include apache
    include apache::snippet { site-test.conf },
    }
    apache::snippet isn't a class, so you don't use 'include' on it. You use
    it the same as a native puppet type. Your node.pp should look like this:

    node 'thegrid.geofusion' {
    include apache
    apache::snippit { 'site-test.conf': }
    }

    --
    Calvin Walton <calvin.walton@kepstin.ca>
  • Havary at Oct 30, 2012 at 9:11 pm
    Calvin Walton,

    thank you!

    Do you recomend a book for reading and learning?

    I will need some help again, maybe I made an other mistake. I made the
    correction in my node.pp. but now I m reciving this error msg:

    *info: Retrieving plugin
    err: Could not retrieve catalog from remote server: Could not intern from
    pson: Could not autoload package: Could not autoload
    /usr/lib/ruby/vendor_ruby/puppet/provider/package/windows.rb: no such file
    to load -- windows/error
    warning: Not using cache on failed catalog
    err: Could not retrieve catalog; skipping run*

    I try googled but no success, it is stranger but there is no reason for
    windows.rb problem. I m using a linux server and a linux client for puppet.

    Thanks!


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/z7l9CLD9FC8J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Josh Cooper at Nov 6, 2012 at 6:06 pm
    Hi Havary,

    Sounds like this might be the same issue as:
    https://groups.google.com/d/topic/puppet-users/3d_cGLwdzWo/discussion

    Did you install the puppetmaster, and then downgrade to an earlier version?
    If so, I'd recommend clearing everything in vendor_ruby/puppet, and then
    re-installing.

    Josh

    On Tue, Oct 30, 2012 at 11:33 AM, Havary wrote:

    Calvin Walton,

    thank you!

    Do you recomend a book for reading and learning?

    I will need some help again, maybe I made an other mistake. I made the
    correction in my node.pp. but now I m reciving this error msg:

    *info: Retrieving plugin
    err: Could not retrieve catalog from remote server: Could not intern from
    pson: Could not autoload package: Could not autoload
    /usr/lib/ruby/vendor_ruby/puppet/provider/package/windows.rb: no such file
    to load -- windows/error
    warning: Not using cache on failed catalog
    err: Could not retrieve catalog; skipping run*

    I try googled but no success, it is stranger but there is no reason for
    windows.rb problem. I m using a linux server and a linux client for puppet.

    Thanks!


    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/z7l9CLD9FC8J.

    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.


    --
    Josh Cooper
    Developer, Puppet Labs

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 30, '12 at 1:59p
activeNov 6, '12 at 6:06p
posts4
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase