Ask Your Question

How to apply class from manifest in standalone mode?

asked 2014-11-28 12:23:13 -0500

xconspirisist gravatar image

Hi folks, I'm very new to puppet, and would like the following workflow;

  1. One Git[Hub] Repository containing a single module and package (for an environment) with a bunch of classes that represent workloads ( ) in that environment.
  2. git checkout that repository onto each server
  3. Apply the class to the server manually (<< main question)

I have been building a module and package, with class manifests that look like this;

class jwr-puppet-module::webserver {
    package { ["httpd", "mysqld"]: 
         ensure => installed

I do install the modules into as root (/etc/puppet/modules/jwr-puppet-module) which do show up with puppet module list. Simply, my question is how to apply class from manifest in standalone mode?

Is there something like puppet apply --module jwr-puppet-module/webserver ?

  • All management tools I'm using at the moment are decentralized (eg, Fabric), I really want to avoid a puppet server.
  • Is there anything else I'm doing here that is considered bad practice?
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-29 05:29:25 -0500

jonn gravatar image

No, this is not bad practice - running Puppet masterless is a pretty common pattern. I think all you need is a manifest that includes the necessary classes:

include jwr-puppet-module::webserver

Put that in a file, point puppet apply at it, and you should be golden.

You should probably switch the dashes for underscores though, to line up with the rules for class names. They may work at the moment, but they won't do in the future.

edit flag offensive delete link more

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


Asked: 2014-11-28 12:21:52 -0500

Seen: 169 times

Last updated: Nov 29 '14