Ask Your Question

Declare non-profile classes in role classes?

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

josh gravatar image

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

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

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

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

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


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

Seen: 137 times

Last updated: Jan 05 '14