----- Original Message -----
> On Fri, Sep 9, 2011 at 4:55 PM, R.I.Pienaar <r...@devco.net> wrote:
> >
> >
> > ----- Original Message -----
> >> On Fri, Sep 9, 2011 at 4:50 PM, R.I.Pienaar <r...@devco.net> wrote:
> >> >
> >> >
> >> > ----- Original Message -----
> >> >> On Fri, Sep 9, 2011 at 4:43 PM, Ken Barber <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,
> >> 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
> Sep  9 17:13:38 hproxy10 puppet-agent[30537]:
> (/Stage[main]/Puppet::Setup/Notify[0.25.5 on
> hproxy10.h.foo.com]/message) defined 'message' as '0.25.5 on
> hproxy10.h.foo.com'

stumped, this is totally f'd up :)

how do you create the node? with an ENC or with node foo {} blocks?

> 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.

yeah so notice() is a function, functions run on the puppet master and 
so you find them in the syslog or whatever.  They get evaluated at compile
time

But this doesnt help if you wanted to log on the node, or give someone 
running puppetd --test some interactive feedback *on the node*

types and providers are the only thing that really 'runs' on a node, so
notify being a resource means you can emit text to the client side and it
shows what would be the result of the compiled catalog.



-- 
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