On Fri, May 20, 2011 at 13:19, hyzhang <hyzh...@jcvi.org> wrote:
> I have a piece of shell script as below:
>
> ACTIVE_INTERFACE=`/sbin/ifconfig | /bin/gawk ' /^eth/ { print $1 } '
> | /usr/bin/head -1`
>
> How do I translate it to puppet code, for example to assign the result
> as a variable to use?

You want to write a custom fact, for Facter.  Normally you would
distribute that as part of the pluginsync process, so it would be sent
to the client by Puppet automatically, and available before your
catalog was compiled.

Regards,
     Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ 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-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