On Sun, 06 Jun 2010, Ashley Penney wrote:
> This is currently killing me too.  I also heavily used definitions in
> nodes for things that didn't really seem to belong in modules (one
> offs, mount points for admins to rummage around on the command line,
> the odd tweak here and there) and the inability to slowly migrate into
> an external node tool is infuriating because of how hard things are to
> test.

As several people have mentioned, you can put the weird stuff into a
host-dependent class.  So, instead of this:

    node foo.domain.example {
        $var = "value"
        include someclass
        define stuff { ...  }
        stuff { "blah": }
    }

you write this:

    class complex_stuff_for_node::foo_domain_example {
        define stuff { ...  }
        stuff { "blah": }
    }

    node foo.domain.example {
        $var = "value"
        include someclass
        include complex_stuff_for_node::foo_domain_example
    }

Later, when you are ready to cut this node over to the external node
classifier, you keep the class definition, remove the node definition,
and make the external node classifier print this YAML:

   ---
   parameters:
     var: "value"
   classes:
   - someclass
   - "complex_stuff_for_node::foo_domain_example"


--apb (Alan Barrett)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to