On Aug 22, 2009, at 6:04 AM, Duncan Hill wrote:

>
> 2009/8/21 Duncan Hill <[email protected]>:
>> 2009/8/20 Larry Ludwig <[email protected]>:
>>>
>>>
>>> On Aug 19, 2009, at 11:03 AM, Duncan Hill wrote:
>>>
>>> why not define the variables per 'node'?  Why use inheritance at  
>>> all?
>>> Personally I'm not a fan of node inheritance and like putting all of
>>> the classes in another class which then is in included in each node.
>
>> node foo {
>>  $ip1 = 1.1.1.1
>>  $ip2 = 2.2.2.2
>>
>>  include host_definitions
>> }
>>
>> class host_definitions {
>>  host {
>>  'fred': { ip => $ip1, alias => [ a, b, c ] }
>>  }
>> }
>>
>> and more often than not I get an error that $ip1 isn't defined, and
>> puppet falls over in a heap.
>
> Well, now it works.  So I'll spend the weekend refactoring my setup to
> behave in this manner, and hopefully lots of problems will go away.
> Thanks Larry.

No problem.  You will find this methodology works well with external  
nodes.

-L

--
Larry Ludwig
Reductive Labs


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