Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Puppet - how to apply module to puppet client node?

Tags:

puppet

just starting with Puppet, really new to this world.

I have

  • CentOS 6 Puppet Master
  • CentOS 6 Puppet Client

In Master have one module:

 puppet module list
/etc/puppet/modules
âââ mstanislav-yum (v1.0.0)

So I want to apply same module to my puppet client but I can't or I don't know why

root@puppetclient: puppet agent --test
Info: Retrieving plugin
Info: Caching catalog for puppetclient
Info: Applying configuration version '1355737643'
Finished catalog run in 0.10 seconds

but there are not any changes to the client :-/

Any idea?

like image 332
Rubendob Avatar asked Dec 17 '12 09:12

Rubendob


People also ask

Where do I put Puppet modules?

The puppet module install command installs a module and all of its dependencies. You can install modules from the Forge, a module repository, or a release tarball. By default, this command installs modules into the first directory in the Puppet modulepath, which defaults to $codedir/environments/production/modules .

How do you use Puppet modules?

To create a module, you must create a directory (whose name matches your module name) in Puppet's modules directory, and it must contain a directory called manifests , and that directory must contain an init. pp file. The init. pp file must only contain a Puppet class that matches the module name.

What is Puppet apply?

Puppet apply is an application that compiles and manages configurations on nodes. It acts like a self-contained combination of the Puppet primary server and Puppet agent applications.

What is the command to build the module in Puppet?

To create a class in your module, use the pdk new class command. The pdk new class command creates a class manifest file, with the naming convention class_name. pp , and a test file. To create the module's main class, defined in an init.


1 Answers

You haven't declared the module (assigned it to your node) yet...

Add this to site.pp:

node 'fqdn of client' {
  include yum
} 

Then, you can run puppet agent -t to see it in action.

like image 86
Ger Apeldoorn Avatar answered Sep 29 '22 11:09

Ger Apeldoorn