inherited roles

33 views
Skip to first unread message

Stuart Cracraft

unread,
Jun 4, 2014, 6:02:46 PM6/4/14
to puppet...@googlegroups.com

What's the best way to do inherited roles for servers?

chef seems to excel at this whereas in Puppet it is wordy (at best).

Robin Bowes

unread,
Jun 4, 2014, 7:19:39 PM6/4/14
to puppet...@googlegroups.com
What do you mean by "inherited roles"?

R.


On 4 June 2014 23:02, Stuart Cracraft <smcra...@gmail.com> wrote:

What's the best way to do inherited roles for servers?

chef seems to excel at this whereas in Puppet it is wordy (at best).

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8ab0a1d7-a53d-4217-8fc1-bfa280fecafb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stuart Cracraft

unread,
Jun 4, 2014, 7:29:20 PM6/4/14
to puppet...@googlegroups.com

may help. Perhaps the choice of words was wrong. The issue is how a node inherits multiple roles.

I would assume from basic class syntax one could just do a::b::c etc to pull stuff in from
subclassing and roll it up to the equivalent of chef roles.

But it looks clumsy.

Comments?
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/p6BqZHcczWU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAJGKfwDm8xOehK%3Dsn5FB7OYHtKXpAFotOmy0k_1r9ahWBeChww%40mail.gmail.com.

Felix Frank

unread,
Jun 4, 2014, 7:40:26 PM6/4/14
to puppet...@googlegroups.com
On 06/05/2014 01:28 AM, Stuart Cracraft wrote:
> I would assume from basic class syntax one could just do a::b::c etc
> to pull stuff in from
> subclassing and roll it up to the equivalent of chef roles.

Hi,

I suggest that you would be Doing It Wrong then.

The author of the blogpost you linked has apparently inherited a Puppet
code base that follows a lot of questionable practices. Or perhaps he
was just confused by the node concepts that are absent from chef. What
he failed to realize is that a node in Puppet is exactly what he
describes as a "node in chef, unlike in Puppet".

Basically, what you want to do is the same he describes for chef.

node my.fqdn.org {
include role::webserver
}

class role::webserver {
include profile::base
include profile::webserver
}

class profile::webserver {
include profile::apache
include profile::openssl
...
}

It is unclear why the author is so obsessed with nodes - the primary
form of expressing such relationships is indeed the class.

HTH,
Felix

Robin Bowes

unread,
Jun 4, 2014, 7:47:48 PM6/4/14
to puppet...@googlegroups.com
The recommended puppet approach is the role/profile/module pattern.

Here's the blog post that defined this: http://www.craigdunn.org/2012/05/239/

R.




--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages