On Sat, Jan 8, 2011 at 14:12, Andr? Lu?s Lopes <andre...@andrelop.org> wrote:

> First of all, this is my very first message to this list, so please bear
> with me while I'm getting used to it.
> Sorry for any non-standard way to ask a question here which I can be using
> without prior knowledgment.

Hey, thanks for joining us.  We love to have new folks come in and
start using puppet. :)

> Is there any way I could make Puppet pass the node hostname via a
> manifest/class/whatever ? I know
> thatone can use Facter's variables into Puppet's manifests (at least I
> recall reading about it somewhere)
> but I was unable to actually get it working and I know that Facter does have
> hostname as one of the
> available variables.
> Any ideas ?

Ben gave the syntax needed to use this in a template, but you should
be able to use either of the 'hostname' or 'fqdn' facts anywhere in
puppet when you run it.  If that isn't working, it can help to post
the snippet of puppet code that is broken.  (Ideally, work out a
half-dozen lines that don't work rather than your entire manifest,
that makes it easier to help you, but either way is fine.)

The reason for doing that is once, say, I have a copy of the manifest
I can test it on my machine and see if it works for me - or fix it, if
it doesn't.  :)

Anyway, welcome to the list,
    Daniel
-- 
✉ Daniel Pittman <dan...@rimspace.net>
⌨ dan...@rimspace.net (XMPP)
☎ +1 503 893 2285
♻ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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