brijesh | 1 Jul 2011 02:19
Picon

[Puppet Users] require => Class

Hi

I have been trying to use class dependency and had no luck so far.
following are the two classes i am trying to use

[root <at> puppet]#cat libreoffice.pp

class libreoffice {

  case $hostname {
  "foo": { package { "libreoffice": ensure => present, require =>
Class["foo1"] } }
}
}

[root <at> puppet]#cat foo.pp

class foo1 {
  package { "openoffice.org-core":
    ensure => absent,
  }
}

When i run puppetd on client i get the error message
 Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class foo1 at /etc/puppet/manifests/classes/
libreoffice.pp:18 on node

Do i need to do anything else in order to use require => Class?

(Continue reading)

vagn scott | 1 Jul 2011 03:18
Picon

Re: [Puppet Users] require => Class

you also have to have a

include foo1

somewhere.

Note that your require is a dependency,
not an instantiation.  require just says
that foo1 has to be installed first,
before libreoffice package can be installed.

-- 
vagn

class libreoffice {

         case $hostname {
                 "foo": {

                         include foo1

                         package { "libreoffice":
                                 ensure => present,
                                 require => Class["foo1"]
                         }
                 }
         }
}

--

-- 
(Continue reading)

Nathan Clemons | 1 Jul 2011 04:53
Favicon
Gravatar

Re: [Puppet Users] require => Class

Are both of the .pp files being imported in site.pp / init.pp?


--
Nathan Clemons
The worlds largest online language learning community



On Thu, Jun 30, 2011 at 5:19 PM, brijesh <bridgepatel <at> gmail.com> wrote:
Hi

I have been trying to use class dependency and had no luck so far.
following are the two classes i am trying to use

[root <at> puppet]#cat libreoffice.pp

class libreoffice {

 case $hostname {
 "foo": { package { "libreoffice": ensure => present, require =>
Class["foo1"] } }
}
}

[root <at> puppet]#cat foo.pp

class foo1 {
 package { "openoffice.org-core":
   ensure => absent,
 }
}

When i run puppetd on client i get the error message
 Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class foo1 at /etc/puppet/manifests/classes/
libreoffice.pp:18 on node

Do i need to do anything else in order to use require => Class?

Any help would be appreciated

Thanks

Brijesh



Do i need

--
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


--
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
brijesh | 1 Jul 2011 05:02
Picon

[Puppet Users] Re: require => Class

thanks
that  worked  i didn't realise i need to include it first.

Brijesh

On Jul 1, 1:18 pm, vagn scott <vagnsc... <at> gmail.com> wrote:
> you also have to have a
>
> include foo1
>
> somewhere.
>
> Note that your require is a dependency,
> not an instantiation.  require just says
> that foo1 has to be installed first,
> before libreoffice package can be installed.
>
> --
> vagn
>
> class libreoffice {
>
>          case $hostname {
>                  "foo": {
>
>                          include foo1
>
>                          package { "libreoffice":
>                                  ensure => present,
>                                  require => Class["foo1"]
>                          }
>                  }
>          }
>
> }

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

brijesh | 1 Jul 2011 05:05
Picon

[Puppet Users] Re: require => Class

yes i  have *.pp in my site.pp file but adding include foo1 fixed the
issue.

On Jul 1, 3:02 pm, brijesh <bridgepa... <at> gmail.com> wrote:
> thanks
> that  worked  i didn't realise i need to include it first.
>
> Brijesh
>
> On Jul 1, 1:18 pm, vagn scott <vagnsc... <at> gmail.com> wrote:
>
> > you also have to have a
>
> > include foo1
>
> > somewhere.
>
> > Note that your require is a dependency,
> > not an instantiation.  require just says
> > that foo1 has to be installed first,
> > before libreoffice package can be installed.
>
> > --
> > vagn
>
> > class libreoffice {
>
> >          case $hostname {
> >                  "foo": {
>
> >                          include foo1
>
> >                          package { "libreoffice":
> >                                  ensure => present,
> >                                  require => Class["foo1"]
> >                          }
> >                  }
> >          }
>
> > }

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Nathan Clemons | 1 Jul 2011 05:21
Favicon
Gravatar

Re: [Puppet Users] Puppet client do-overs

What problem do you have with puppetstoreconfigclean.rb? The problem I usually have is that I forget it has to be run as root on the puppetmaster, I keep thinking I need to run it on the client machine.


--
Nathan Clemons
The worlds largest online language learning community



On Thu, Jun 30, 2011 at 9:59 AM, Craig White <craig.white <at> ttiltd.com> wrote:
I am pulling in the 'client' intended version of puppet.conf on my puppetmaster system - probably because I had a package that required a class it shouldn't have and I have fixed that (I think - hard to test) but even after killing off all puppetd processes, clearing out /var/lib/puppet/client_yaml/* and /var/lib/puppet/state/* and restarting puppetd they just seem to reload the specific mod_puppet classes that it shouldn't. Perhaps it is a stored config and I've tried running puppetstoredconfigclean.rb without any success (user stupidity for not knowing what this host file is supposed to look like).

How can I get a fresh start with a client so it operates only on the classes it is configured to use?

Craig

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  craig.white <at> ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

--
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


--
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Denmat | 1 Jul 2011 09:00
Picon
Gravatar

Re: [Puppet Users] puppet autosign by VLAN IP

Hi, 

I'm pretty sure the signing can only reference the cert name in the SSL certificate. 

Cheers,
Den

On 01/07/2011, at 4:12, hyzhang <hyzhang <at> jcvi.org> wrote:

> Hi,
> 
> Can puppet autosign work by giving vlan IP instead of domain?
> 
> For example, in the autosign.conf file, instead of using
> *.mydomain.org, I want to give 172.18.133.*
> 
> But it does not seem to work if I give the IP address. But I don't
> want to limit the client from *.mydomain.org by only allow certain
> vlan client not all the are in the same domain.
> 
> Thanks,
> -Haiyan
> 
> -- 
> 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 <at> googlegroups.com.
> To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> 

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

vagn scott | 1 Jul 2011 10:25
Picon

Re: [Puppet Users] Re: How to define a hash table and loop over them in a definition?

Maybe you've got network issues?
1 minute sounds like two DNS lookups timing out.

-- 
vagn

On 06/30/2011 01:42 PM, Haitao Jiang wrote:
> Thanks a lot for both answers! Very helpful.
>
> However, I was a little surprised that how slow Puppet was when I run
> your example. Was it Puppet just slow or was it just my VM is slow? I
> literally had to wait 1 min to get the result:
>
> Thu Jun 30 10:37:56 PDT 2011
> notice: Finished catalog run in 0.02 seconds
> Thu Jun 30 10:38:58 PDT 2011
>
> Did I do anything wrong here?  I was running it under Ubuntu 10.04
>
> Thanks again!
>    

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

vagn scott | 1 Jul 2011 10:42
Picon

Re: [Puppet Users] functions and environments

On 06/17/2011 10:52 AM, Nigel Kersten wrote:
> It's not entirely unreasonable to expect that if module 'foo' is found 
> in one modulepath component, that no other module named 'foo' should 
> come into play, but I think we have some edge cases here. Please feel 
> free to file a feature request around modulepath behaving more like 
> $PATH in the shell does.

I actually played around with this for a while, trying to come up with a 
scheme for
stackable configurations.  The hack needed to make it work is to install 
links
higher in the stack to files lower in the stack, because where ever 
puppet finds
a module in the stack of modules trees, that module tree is where it 
looks for all the
other related files.  It will not drill down through the stack ('path') 
for each file of
the module.  Nor would you want it to.

Anyway, it ended up ugly, and I went looking for a better way.
-- 
vagn

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

jcbollinger | 1 Jul 2011 14:58

[Puppet Users] Re: How to define a hash table and loop over them in a definition?


On Jun 30, 12:42 pm, Haitao Jiang <jianghai... <at> gmail.com> wrote:
> Thanks a lot for both answers! Very helpful.
>
> However, I was a little surprised that how slow Puppet was when I run
> your example. Was it Puppet just slow or was it just my VM is slow? I
> literally had to wait 1 min to get the result:
>
> Thu Jun 30 10:37:56 PDT 2011
> notice: Finished catalog run in 0.02 seconds
> Thu Jun 30 10:38:58 PDT 2011
>
> Did I do anything wrong here?  I was running it under Ubuntu 10.04

Puppet reported spending just 20 milliseconds applying the catalog.
Your puppetmaster's log will show how long it spent compiling that
catalog.  Any other elapsed time is not directly attributable to
Puppet, but is not necessarily the result of running in VM, either.
It could be a result of multiple VMs contending for processor and/or
network resources, of a network configuration problem (e.g. Vagn's DNS
timeout), or of simple network congestion.  There are undoubtedly
other possibilities as well.

John

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Gmane