Calling a class on a new machine

Hi all
Bit of background on what I'm trying to do.

I'm trying to set something up that when a new machine is added to foreman
a number of commands, unique to that machine name, are executed.
Historically I would of used a node definition but can't even get a "node
default" to work. Reading around it looks like node isn't do-able on
Foreman and I might be better off using smart variables. Could someone give
me an idea of if this approach is sane as starting to loose the will to
live…

thanks

Russ

That depends on what what is your node definition. If all you had in there
were class resources (eg node default { include apache ) then you're good
to go, as that's what Foreman's ENC is for - applying classes to nodes. If
you had raw resources in there, you'll need to make them into a class
first, and then apply it (e.g. I have modules/base/manifests/init.pp which
applies 'base' to all my hosts).

Note that you can use site.pp with an ENC, but it comes with certain
caveats - see
http://docs.puppetlabs.com/guides/external_nodes.html#how-merging-works for
details