Ask Your Question
1

Declare non-profile classes in role classes?

asked 2014-01-03 10:53:13 -0500

josh gravatar image

updated 2014-01-03 10:53:51 -0500

I was under the impression that you should only delcare profile::xyz classes within role classes, but this PE3 documentation says otherwise:

http://docs.puppetlabs.com/pe/latest/puppetassignconfigurations.html#assigning-configuration-data-with-role-and-profile-modules

It states that you can declare other types of resources and classes within the role class. Does this go against the role/profile best-practices?

I ask because I'm in the process of writing a module/profile/class to manage bind servers, and I have two main configurations - recursive and authoritative. I was thinking of differentiating between the two with a custom $app fact (which is in ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-05 19:02:25 -0500

ramindk gravatar image

Ideally roles contain only profiles and profiles only modules, but as was recently said on the mailing list, "The Puppet police aren't going to arrest you for not adhering to an ideal."

However the resource in your role is data not code and in my opinion it doesn't belong in any module. I would also guess that you need to know the value of $app in order to setup the server so you'd need at least two runs. I usually get around this by doing something like the following when I run the agent for the first ... (more)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-01-03 10:53:13 -0500

Seen: 137 times

Last updated: Jan 05 '14