Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I mount Cloudfuse to access Rackspace's Cloudfiles using Puppet, but on a new host, mount runs too soon, even though I require the whole class. In Pro Puppet, James recommends splitting class definitions like this:

class cloudfuse{
  include cloudfuse::install, cloudfuse::service, cloudfuse::config

class cloudfuse::install{
  # download and install

class cloudfuse::config{
    notify => Class['cloudfuse::service'],

class cloudfuse::service{
    ensure => running,

That works just fine. When I'm ready to mount, I require the top-level, parent class, like this:

exec{'mount /data/cloudfiles':
  command => "/usr/local/bin/cloudfuse /data/cloudfiles",
  require => [

Questions are:

  1. Is this idiomatic? I've seen this elsewhere, so I'd say it is.
  2. Should I actually require cloudfuse::install instead of the parent?

I know that requiring cloudfuse::install will fix my problem, but if I have a very simple class, maybe I won't split in three like this, then I'd have to guess / look at the manifest to know how to declare the dependency.

share|improve this question
up vote 7 down vote accepted

Disclosure, I am one of the developers of Puppet.

Unfortunately, a bug in Puppet means that a class that only contains other classes doesn't cause transitive dependencies. You can use the "anchor" pattern to work around that, or you can add an otherwise meaningless resource to the top level class, as in:

class cloudfuse {
  include cloudfuse::install, ...
  notify { "hate #8040": message => "work around bug #8040" }

You can follow bug #8040 to watch for when we finally get this fixed.

share|improve this answer
I don't really understand where anchors are coming from? They must be a type, but I don't see any implementation of it, or references to it from – François Beausoleil Feb 21 '12 at 2:22
They are part of the puppet-stdlib module at or available on the forge. That link to the pattern page is a wiki, feel free to update it, or I will try to remember to make the link tomorrow. – Daniel Pittman Feb 21 '12 at 2:24
Thanks for your time. I updated the wiki… – François Beausoleil Feb 21 '12 at 3:18
Thank you so much. :) – Daniel Pittman Feb 21 '12 at 4:09

Your Answer


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.