Notify is a resource, notice() is a function. So notice() is evaluated on the 
server, whereas notify{} is evaluated on the client.

My suspicion is that you somehow have two versions of the client binary hanging 
around. Perhaps one that is running when you execute "puppet" at the shell, and 
another running in the background.

Per Ken's question - how are you launching Puppet? Is it as a service? Or are 
you running it from a cron job?

-Eric


On Friday, September 9, 2011 at 8:16 PM, Douglas Garstang wrote:

> On Fri, Sep 9, 2011 at 4:55 PM, R.I.Pienaar <r...@devco.net 
> (mailto:r...@devco.net)> wrote:
> > 
> > 
> > ----- Original Message -----
> > > On Fri, Sep 9, 2011 at 4:50 PM, R.I.Pienaar <r...@devco.net 
> > > (mailto:r...@devco.net)> wrote:
> > > > 
> > > > 
> > > > ----- Original Message -----
> > > > > On Fri, Sep 9, 2011 at 4:43 PM, Ken Barber <k...@puppetlabs.com 
> > > > > (mailto:k...@puppetlabs.com)>
> > > > > wrote:
> > > > > > What does:
> > > > > > 
> > > > > > puppet -e 'notice("$puppetversion")'
> > > > > > 
> > > > > > Show on the _client_? I know its probably obvious but you never
> > > > > > know.
> > > > > 
> > > > > Actually, it's not obvious. I didn't know you could do that. Never
> > > > > seen it documented anywhere...
> > > > 
> > > > > notice: Scope(Class[main]): 2.7.3
> > > > > notice: Finished catalog run in 0.21 seconds
> > > > 
> > > > if you change the notice() in your manifests to
> > > > notify{"${puppetversion} on ${fqdn}":}
> > > > and run puppet agent --test on the node, does it still give the
> > > > wrong version?
> > > 
> > > Changing the notice line to:
> > > notice ("fqdn = ${fqdn}, puppetversion = ${puppetversion}")
> > > 
> > > still gives (on the master):
> > > Sep 9 16:52:09 sv2admin1 puppet-master[14087]:
> > > (Scope(Class[Puppet::Setup])) fqdn = hproxy10.h.foo.com 
> > > (http://hproxy10.h.foo.com),
> > > puppetversion
> > > = 0.25.5
> > > 
> > > I assume you mean't to use notify(), not notify{} .... ?
> > 
> > no, i did mean use notify :)
> 
> Ok, using notify{}, the client now says:
> 
> Sep 9 17:13:38 hproxy10 puppet-agent[30537]: 0.25.5 on hproxy10.h.foo.com 
> (http://hproxy10.h.foo.com)
> Sep 9 17:13:38 hproxy10 puppet-agent[30537]:
> (/Stage[main]/Puppet::Setup/Notify[0.25.5 on
> hproxy10.h.foo.com (http://hproxy10.h.foo.com)]/message) defined 'message' as 
> '0.25.5 on
> hproxy10.h.foo.com (http://hproxy10.h.foo.com)'
> 
> I know I'll get slammed for asking, but where is the use of notify{}
> in this manner documented? I didn't know you could do that. WHat does
> notify do? As far as the docs are concerned, it's a resource type.
> 
> Interestingly, it returns 0.25.5...
> 
> Doug.
> 
> -- 
> 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 
> (mailto:puppet-users@googlegroups.com).
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com 
> (mailto:puppet-users+unsubscr...@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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to