Nice one Pete -

that's what I was aiming for, but you've probably saved me a day
and half a bottle of rum getting there :)

On Sun, Oct 25, 2009 at 12:30 PM, Peter Meier <peter.me...@immerda.ch> wrote:
>
> Hi
>
>> Thanks, I've seen that work but the trouble is I want to be able to
>> pass in a $docroot option,
>> or default to something if one is not there; I suppose I can probably
>> get around it by checking
>> if $docroot is defined and if not setting it or something?
>
> how about:
>
> define bar($docroot = undef) {
>  if $docroot == $undef { $real_docroot = "/tmp/$name" }
>  else { $real_docroot = $docroot }
>
>  file { $real_docroot: ensure => present }
> }
>
> cheers pete
>
> >
>

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