On 6/23/2014 4:05 AM, Ben Ruset wrote:
Ah, okay this makes more sense for me. So I know that I can stick this
in the same file with the node definitions, but there's got to be a
better place for it to go. Where would the "proper" place be for it to go?
Many thanks for your responses. They've been very helpful.
Simplest solution might be to organize around role/profiles without
doing all the fancy create_resources Hiera stuff. However I would take
this time to learn Hiera. It's much easier to start with Hiera than to
graph it on later. My 2000+ line commit last summer assures me of this.
Using Hiera helps you separate data from code which makes you write less
code and the code you do right tends to suck less.
That said if you still want to get it up and running without going down
that path it might look a bit like the following.
node site-frontend01 {
include role::frontend
}
node site-middleware01 {
include role::middleware
}
class role::frontend {
include profile::apache
include profile::base
include profile::frontend
include profile::php
}
class role::middleware {
include profile::apache
include profile::base
include profile::java
include profile::middleware
include profile::varnish
}
class profile::frontend {
include ::apache
include ::sitecode
apache::vhost { 'www.example.com':
blah => stuff
}
apache::vhost { 'www.notexample.com':
blah => stuff
}
}
class profile::middleware {
include ::apache
include ::appcode
apache::vhost { 'app.example.com':
blah => stuff,
port => 8080,
}
apache::vhost { 'app.notexample.com':
blah => stuff,
port => 8081,
}
}
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/53A86B04.9070202%40badapple.net.
For more options, visit https://groups.google.com/d/optout.