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

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jcbollinger at Jul 17, 2012 at 1:47 pm

    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.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/uP6y8zvzqnQJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Anatoliy Lisovskiy at Jul 17, 2012 at 4:09 pm

    On Tue, Jul 17, 2012 at 6:47 AM, jcbollinger 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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jcbollinger at Jul 18, 2012 at 7:15 pm

    On Tuesday, July 17, 2012 11:09:18 AM UTC-5, Anatoliy Lisovskiy (Wavebourn) wrote:


    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?
    Your expectations appear reasonable. That's about all I can say at this
    point. If you want more then refer to my previous message for a
    description of the information you will need to provide.


    John


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/cINL3j-Cvi8J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 16, '12 at 11:50p
activeJul 18, '12 at 7:15p
posts4
users2
websitepuppetlabs.com

2 users in discussion

Anatoliy Lisovskiy: 2 posts Jcbollinger: 2 posts

People

Translate

site design / logo © 2022 Grokbase