Hostgroup requirements changed in 0.4?

So I made some hostgroups in 0.3 and they are working great. I went
to create some more today after upgrading to 0.4 1+ week ago and it
seems requirements have changed. I now need to select an environment
for a hostgroup before I can select classes under 'additional
classes'. Before I didn't have to pick an environment and could pick
additional classes.

While I see why this requirement was added (classes can exist only in
certain environments) it actually prevents me from doing what I want
to do.

We manage our environment variable outside of foreman. So I'm using
the option for facts to update foreman with the environment. I don't
want a hostgroup to override that. Also, all of our classes exist in
all environments (except for new ones which for maybe a week exist in
non-prod envs before prod as we push out updated code). So for me to
use hostgroups it would be best to not set an environment and still be
able to assign classes.

Maybe I am going about doing this wrong and there is a better way to
achieve my goals outlined above?

Thanks,
Jake

> So I made some hostgroups in 0.3 and they are working great. I went
> to create some more today after upgrading to 0.4 1+ week ago and it
> seems requirements have changed. I now need to select an environment
> for a hostgroup before I can select classes under 'additional
> classes'. Before I didn't have to pick an environment and could pick
> additional classes.
>
> While I see why this requirement was added (classes can exist only in
> certain environments) it actually prevents me from doing what I want
> to do.
>
> We manage our environment variable outside of foreman. So I'm using
> the option for facts to update foreman with the environment. I don't
> want a hostgroup to override that. Also, all of our classes exist in
> all environments (except for new ones which for maybe a week exist in
> non-prod envs before prod as we push out updated code). So for me to
> use hostgroups it would be best to not set an environment and still be
> able to assign classes.

as far as I remember, the main reason (excluding what you said about
classes above) for adding the environment settings per hostgroup, is
simply to setup defaults when creating a new host.

If you use foreman with provisioning, you can simply create a new host
based on a hostgroup (in this case nearly identical to a "template"),
which would contain all of the info that foreman needs to provision
and configure the new host.

I think that even if you select a hostgroup, you can still chose the
environment you want per host.

Ohad

··· On Wed, Nov 23, 2011 at 4:05 PM, jmccann wrote: > > Maybe I am going about doing this wrong and there is a better way to > achieve my goals outlined above? > > Thanks, > Jake > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en. > >

Yea, we use hostgroups for the ability to apply a hostgroup to
multiple systems at once with a set of classes. Probably will
eventually use it as your described where its applied during build.
Baby steps. :wink: But even doing that I wouldn't want it to manage the
env from the hostgroup.

I'll test creating a new hostgroup with a set env and verify that it
doesn't actually change the env of the host its applied to.

Thanks for the response!
Jake

··· On Nov 23, 1:12 pm, Ohad Levy wrote: > On Wed, Nov 23, 2011 at 4:05 PM, jmccann wrote: > > So I made some hostgroups in 0.3 and they are working great. I went > > to create some more today after upgrading to 0.4 1+ week ago and it > > seems requirements have changed. I now need to select an environment > > for a hostgroup before I can select classes under 'additional > > classes'. Before I didn't have to pick an environment and could pick > > additional classes. > > > While I see why this requirement was added (classes can exist only in > > certain environments) it actually prevents me from doing what I want > > to do. > > > We manage our environment variable outside of foreman. So I'm using > > the option for facts to update foreman with the environment. I don't > > want a hostgroup to override that. Also, all of our classes exist in > > all environments (except for new ones which for maybe a week exist in > > non-prod envs before prod as we push out updated code). So for me to > > use hostgroups it would be best to not set an environment and still be > > able to assign classes. > > as far as I remember, the main reason (excluding what you said about > classes above) for adding the environment settings per hostgroup, is > simply to setup defaults when creating a new host. > > If you use foreman with provisioning, you can simply create a new host > based on a hostgroup (in this case nearly identical to a "template"), > which would contain all of the info that foreman needs to provision > and configure the new host. > > I think that even if you select a hostgroup, you can still chose the > environment you want per host. > > Ohad > > > > > > > > > > > Maybe I am going about doing this wrong and there is a better way to > > achieve my goals outlined above? > > > Thanks, > > Jake > > > -- > > You received this message because you are subscribed to the Google Groups "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/foreman-users?hl=en.