Hi

> You can do this, but it remove a lot of interest you have when using
> external nodes.
> It means you have to provides one class per definition use (for each
> distinct list of couples (param, value) that you must provide to the
> call to your definition)

no. you can use the variables provided by the external tool in the  
classes you include. you even then could implement kind of default  
values for these variables in the class.

for an illustration:

$test = 'foobar'

include testclass

class testclass {
    case $test {
       '': { $test = 'default_value' }
    }

    $testparam = "test_${test}"

    testdefine{"name_${test}": param => $testparam }
}

define testdefine( $param ){
    notice("${name} called with ${param}")
}

---
# puppet foo.pp
notice: Scope(Testdefine[name_foobar]): name_foobar called with test_foobar

this is completely besides the discussion if it should be able to call  
defines from an external tool.

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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to