Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On our puppet box ( under the puppet/modules folder ) , I have added a module for installing a package. I then added the classes needed for the resources into the init.pp ( and other derived class files ) into the manifests folder. I configured these classes and the corresponding nodes associated with them in the puppet dashboard.

When I run puppet-agent with the environment flag , I see that puppet does not run my module. It is running couple of other modules defined similarly on the box alongside my module , but not my module.

What configuration is needed so puppet-agent picks up a module and runs the manifests it defines ? For simplicity , I want to do this on one box first.

share|improve this question
add comment

1 Answer 1

So, a module is a great way to create a contained re-usable class. However, to deploy a module, it has to be called/defined, which is not done by default.

You can do this one of two ways -- if it's a one time sort of thing, you can simple do a; puppet apply -e 'module' on the agent and that should apply the module (or give you an error ;)!)

However, if it's something you wanted to permanently alter... I'd do something like this.

Create file called nodes.pp @ /etc/puppet/manifests In nodes.pp;

node 'test.domain.com' { include modulename }

Then in site.pp @ /etc/puppet/manifests, you just have to make sure at the top there is;

import 'nodes.pp'

Then you can run like a puppet agent -t and you'll see it attempt to get the module.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.