On Tue, Jul 17, 2012 at 6:47 AM, jcbollinger <john.bollin...@stjude.org>wrote:

>
>
> On Monday, July 16, 2012 6:50:36 PM UTC-5, Anatoliy Lisovskiy (Wavebourn)
> wrote:
>>
>> Hi!
>> What I am doing wrong?
>>
>> When I define such a way:
>> ===========================
>> import "classes/*.pp"
>>
>> node default{
>>     include ntp
>>     include add_admin_accounts
>>
>> }
>>
>>
>> node kvm4 inherits default
>> {
>> include vm_create
>> }
>> ===================
>>
>> it can't find the class from the file imported file.
>>
>> But when I write such way:
>>
>> ===========================
>> import "classes/*.pp"
>>
>> node default{
>>     include ntp
>>     include add_admin_accounts
>>    include vm_create
>> }
>>
>> node kvm4 inherits default
>> {
>>
>> }
>> ===================
>>
>> it works fine. What I am doing wrong?
>>
>
> Using the 'import' function?
>
> I apologize for the flippancy, but
>
>    1. you haven't given us much to work with, and
>    2. instead of using 'import', you really should be putting your
>    classes into modules and relying on the autoloader.
>
> If you want us to have any hope of troubleshooting the immediate problem
> then please provide the actual error message emitted by puppet and all the
> classes/*.pp files.  For best results, find a minimal set and minimal
> content for the imported manifests that still exhibits the problem.
>

Thank you John.

The problem is, when I expand the node ("kvm7" in the example) that
inherits description of another node ("default" in the example) puppet
can't find the class I add to the node ("vm_create" in the example) during
client-server transaction.  But when I add this class to the "default" node
it works fine.
"Puppet parser validate" does not complain though in both cases. It is
2.7.18 version, I did not try another one. May be I use wrong syntax, but I
can't find in documentation why it should not work: I understand that the
node that inherits another node description can be expanded by adding to
it's description additional classes, no?

Anatoliy

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