Smart-Class-Parameter - Override value for specific hosts

Hello!

I have a problem, I hope you can help me.

I want to override the value of a Smart-Class-Parameter (type: boolean).
The problem here is, that I don't want to override it for one of the
mentioned values (fqdn, hostgroup, os, domain), but I want to override it
for a special configuration group.
For this I have two configuration groups: One to set the parameter to false
and the other one to true.

Is there any way to set a configuration group instead of a host group for
example?

Thanks,
Hoize

Hello

I'm afraid that it's currently impossible. The reason why it was not added
IIRC was that it's complicated to handle the override order, since host can
have multiple config groups and each could override the same parameter.

··· On Wednesday 04 of February 2015 07:03:35 hoize wrote: > Hello! > > I have a problem, I hope you can help me. > > I want to override the value of a Smart-Class-Parameter (type: boolean). > The problem here is, that I don't want to override it for one of the > mentioned values (fqdn, hostgroup, os, domain), but I want to override it > for a special configuration group. > For this I have two configuration groups: One to set the parameter to false > and the other one to true. > > Is there any way to set a configuration group instead of a host group for > example? > > Thanks, > Hoize


Marek

Hi!

Thank You.
But is there another way to set variables dependent on the Configuration?
I only know two ways:
- writing more classes to provide different variables (I think this
would be a little bit confusing in the WebUI)
- setting the variable individual on the host (better than the first
option, but it would be great to have a overall view which host becomes
which class)

Thanks,
Hoize

Someone may know better solution but you could use Foreman API inside puppet
manifest to find out config groups assigned to $fqdn and decide upon that
finding.

··· On Thursday 05 of February 2015 05:19:23 hoize wrote: > Hi! > > Thank You. > But is there another way to set variables dependent on the Configuration? > I only know two ways: > - writing more classes to provide different variables (I think this > would be a little bit confusing in the WebUI) > - setting the variable individual on the host (better than the first > option, but it would be great to have a overall view which host becomes > which class) > > Thanks, > Hoize


Marek

Sorry, I don't understand what you mean with "use Foreman API inside puppet
manifest".
Do you talk about using 'Facts' in a manifest?

Hoize

No, I meant using puppet function that would contact Foreman, using its API to
retrieve the data that you could use to decide what's the value of parameter.
There is already some existing code for this, I just can't find the link. Ohad
would know where it lives.

··· On Friday 06 of February 2015 01:20:39 hoize wrote: > Sorry, I don't understand what you mean with "use Foreman API inside puppet > manifest". > Do you talk about using 'Facts' in a manifest? > > Hoize


Marek

Oh, okey. I will have a look and if i find a solution, I will post it here.

Thank you very much!

Hoize

··· Am Freitag, 6. Februar 2015 10:40:07 UTC+1 schrieb Marek Hulan: > > On Friday 06 of February 2015 01:20:39 hoize wrote: > > Sorry, I don't understand what you mean with "use Foreman API inside > puppet > > manifest". > > Do you talk about using 'Facts' in a manifest? > > > > Hoize > > No, I meant using puppet function that would contact Foreman, using its > API to > retrieve the data that you could use to decide what's the value of > parameter. > There is already some existing code for this, I just can't find the link. > Ohad > would know where it lives. > > -- > Marek >

Hi, I got the same problem and currently I have to define multiple classes
in order to have different parameters for each host.
It makes difficulty to deploy same service with different configuration on
multiple hosts.
Have you find out any other better solution?

Just find out a solution is that creates an override value for each host
with its matcher is fqdn=<HOSTNAME> and its own value.

··· On Friday, September 9, 2016 at 6:27:19 PM UTC+7, an...@viosoft.com wrote: > > Hi, I got the same problem and currently I have to define multiple classes > in order to have different parameters for each host. > It makes difficulty to deploy same service with different configuration on > multiple hosts. > Have you find out any other better solution? >