Message from discussion
Clearly not understanding import
Received: by 10.90.73.5 with SMTP id v5mr10208013aga.0.1214335970547;
Tue, 24 Jun 2008 12:32:50 -0700 (PDT)
Return-Path: <ehi...@gmail.com>
Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.191])
by mx.google.com with ESMTP id z53si60074pyg.1.2008.06.24.12.32.49;
Tue, 24 Jun 2008 12:32:50 -0700 (PDT)
Received-SPF: pass (google.com: domain of ehi...@gmail.com designates 209.85.142.191 as permitted sender) client-ip=209.85.142.191;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of ehi...@gmail.com designates 209.85.142.191 as permitted sender) smtp.mail=ehi...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by ti-out-0910.google.com with SMTP id y6so1616807tia.18
for <puppet-users@googlegroups.com>; Tue, 24 Jun 2008 12:32:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to
:subject:in-reply-to:mime-version:content-type
:content-transfer-encoding:content-disposition:references;
bh=LoQP3XbvFN5KEDkr7wyGFCg4pu6oAeaXJhLESfAwMeI=;
b=pr4545y/J0Cn5ktFRSALv6XcWzNaSEMYVCf+UaWH/dD9zteAAKZ2NH5DAFxhFBhF1a
Cagq0nXTAA7EEaBGOQ7OYh1oeRG7M065smpq9dK1ippkJuz8nLjbCg2JHNHTTsd+QEfZ
ne0fpbJ/+tJ89M4AEAmlXDbXTOAmNP7XPiYFI=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:in-reply-to:mime-version
:content-type:content-transfer-encoding:content-disposition
:references;
b=dZlYKga8qnse5k/vfe0f1rVNufEN4RnPqIVy7FB1VBKW2ooxa/7srG4Fi1p5TEyKCG
Jim38aLSDH3oXc8gKmJ+At/kfYcFXMe5AxE303BF3E5d7BEiBav3IbBa1/1nazLZrxN1
ebmQthF7XLZlQFTaY8edErKe76R76PiEygPR4=
Received: by 10.142.142.14 with SMTP id p14mr6162032wfd.139.1214335969002;
Tue, 24 Jun 2008 12:32:49 -0700 (PDT)
Received: by 10.151.13.12 with HTTP; Tue, 24 Jun 2008 12:32:48 -0700 (PDT)
Message-ID: <6ae8bb320806241232t48652147w79de347156845e0e@mail.gmail.com>
Date: Tue, 24 Jun 2008 14:32:48 -0500
From: "Evan Hisey" <ehi...@gmail.com>
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Clearly not understanding import
In-Reply-To: <1e6de61e-8dd2-49cb-ba5d-c19160506...@s50g2000hsb.googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <1e6de61e-8dd2-49cb-ba5d-c19160506...@s50g2000hsb.googlegroups.com>
On Tue, Jun 24, 2008 at 12:40 PM, steve koppelman
<steve.koppel...@gmail.com> wrote:
>
> I'm new at this. I've pored over the Quickstart and Best Practices.
> I've searched, looked through this list's archives, and here I am.
>
> When I run "puppet -d --parseonly site.pp on the following I get this:
>
> debug: importing 'base.pp'
> debug: importing 'httpserver.pp'
> err: Could not parse for environment development: Could not match
> 'class' at httpserver.pp:2
>
> When I take the contents of httpserver.pp and paste them into the end
> of site.pp instead, I get no errors.
>
> What am I doing wrong?
>
> Thanks.
>
> ------------------------------------------------------------
>
> #site.pp
>
> filebucket { main: server => puppet }
>
> File { backup => main }
> Exec { path => "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin/:/
> bin:/sbin" }
>
> Package {
> provider => $operatingsystem ? {
> centos => yum,
> redhat => up2date
> }
> }
>
> schedule { everyfive:
> period => hourly,
> repeat => 12,
> }
>
> import "base"
> import "httpserver"
>
> -----
>
> # base.pp
>
> class base {
> file { "/etc/passwd":
> owner => root,
> group => root,
> mode => 644,
> }
>
> host { "puppet":
> ip => "172.16.2.12",
> ensure => present,
> }
>
> host { "svn":
> alias => ["svn.online", "svn.online.amexpub.com"],
> ip => "172.16.2.12",
> ensure => present,
> }
>
> }
>
> ---
>
> # httpserver.pp
>
> class httpserver {
> package { "httpd":
> ensure => installed,
> ensure => running,
> schedule => everyfive,
> }
> service { "httpd":
> subscribe => File["/etc/httpd/conf/httpd.conf"],
> }
> }
What does your puppet.conf look like and what is the node definition?
Evan