Ask Your Question
0

puppet can't find module class from site.pp

asked 2013-09-02 12:56:47 -0500

jaksky gravatar image

updated 2013-09-02 14:47:48 -0500

I am new to puppet and I am strugling with error Couldn't find class profile::profileDev for ...

I am following profile/role abstraction for puppet. I have a module "profile" with defined classes, file baseNode.pp within module manifests:

class profile::baseNode($nodeId = undef){ some content}

Then I have class in file nodeB.pp within module manifests:

class profile::nodeB inherits baseNode{ ...}

In my site.pp

node 'puppetmaster.localdomain'{       
   class {'profile::nodeB':
    nodeId => 1,
   }
}

I have verified that "include profile" works. But I am unable to refer classes within module. Using puppet 2.7 Is there any obvious error ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-09-02 15:02:38 -0500

jaksky gravatar image

I think that I've finally found the problem. It seems that the problem is the camelcasing in class names and filenames. Because if I lowercase all the names than it all works. basenode.pp

class profile::basenode($nodeId = undef){ some content}

nodeb.pp

class profile::nodeb inherits basenode{ ...}

In site.pp

node 'puppetmaster.localdomain'{       
   class {'profile::nodeb':
    nodeId => 1,
   }
}
edit flag offensive delete link more
1

answered 2013-09-02 14:19:09 -0500

nibalizer gravatar image

If you are new to Puppet, I recommend learning about the Puppet basics first. The Puppet learning guide is a great way to do this. Everything can be done with the vm image they provide for you and the guide available for free online.

http://docs.puppetlabs.com/learning/

Roles, Profiles, and module layout and structure are all very important, but they are generally advanced topics. And what you've posted above doesn't make a lot of sense. If you use an include statement and a specific class statement both on profile::node1, you'll just be including the ... (more)

edit flag offensive delete link more

Comments

Thanks for response. Having include + class def was a type when I was trying to find why id doesn't work. I have already went through learning tutorial using learning ...(more)

jaksky gravatar imagejaksky ( 2013-09-02 14:51:06 -0500 )edit

But anyway thanks a lot for your effort to help

jaksky gravatar imagejaksky ( 2013-09-02 14:58:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-09-02 12:56:47 -0500

Seen: 1,939 times

Last updated: Sep 02 '13