The last part of that sentence was missing:

>   - pro: It is possible to include the
... include the worker profile in the base.pp

Am Mi., 6. Nov. 2019 um 10:54 Uhr schrieb Karsten Heymann <
[email protected]>:

> Am Mi., 6. Nov. 2019 um 01:54 Uhr schrieb Alan Evans <[email protected]
> >:
> > Sorry, I misread.  I see what you're saying.  This is like what I was
> proposing w/ hiera.  The trouble is that it's not really R&P then as has
> been brought up by jcbollinger.
>
> I think there are at least three ways to handle this, and all of them have
> their valid uses:
>
> 1) Explicitly include the worker profile in every role but the master role
>   - pro: you need no logic to disable the worker profile in the master role
>   - con: A lot of repetition in the other roles
> 2) Add a "disable switch" hiera variable to the worker profile and then
> include it in the base.pp. For the master node, you disable the worker
> profile via the hiera switch and explicitly include the master profile
>   - pro: It is possible to include the
>   - con: You need to wrap the code in the worker profile into a large if
> not $disabled { ... } clause
> 3) Create a wrapper profile for master and worker that conditionally,
> depending on a hiera variable, load one class or the other. That variable
> could be a $service_type = master|worker enum or the fqdn of the master
> server to compare again in the wrapper class if the master name is already
> needed i.e. for configuring the workers: if $facts['fqdn'] == $mastername
> { include profile::service::master } else { include profile::service::slave
> }
>   - pro: You need only a single include in the role or base.pp for every
> server somehow related to that service, be it master or worker
>   - con: In the role class it is not directly visible if the server is a
> master or a worker.
>
> Which one of these to use (if any) depends on your preferences and
> situation, of course.
>
> Best regards
> Karsten
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAL017hAEqM8zG67h-rY%3DnVHo2eNLPBbfCkOpJEj9SH%3DRf-%2Bafw%40mail.gmail.com.

Reply via email to