On 13.12.2009 23:09, Douglas Garstang wrote:
> So, I've been doing something like this for applications that have a
> client and server component...
>
> node base_node {
>     include syslog_ng::client
> }}
>
> node app_node inherits base_node {
> }
>
> node syslog_server inherits base_node {
>    include syslog_ng::server
> }
>
> ... because I want the client portion, syslog-ng in this case to be
> installed on everything. However, the server node also has a server
> running. When you do this, puppet complains because on the
> syslog_server node, both are trying to manage the same files
> (/etc/syslog-ng/syslog-ng.conf for example).
>
> What's the best approach for this? I could combine both the client and
> server into one module and simple use case statements to serve out
> files based on their hostname, but that seems ugly. Is there a better
> idea? Can I "UN" include a class?


If the syslog_ng::client and syslog_ng::server classes are expected to 
be included on the same node, they should be designed to cooperate. This 
is achieved most efficiently by either using a common base class (e.g. 
syslog_ng::base) or inheriting one from the other, depending on the 
functional relationships (e.g. I have ssh on all servers, but sshd only 
on a few, thus ssh::server inherits ssh::client and uses the basic setup 
from there).


Regards, DavidS

--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to