Answers below.
>
> > Is it possible to assign multiple host groups to a host?
>
> In short, no. But that might not be what you need.
>
> > Ideally I have a set of base host groups for each site that my servers
> can
> > sit in (ie: US1, HK1, SY1, etc). These host groups define things such at
> > the location, capsule, puppet master and puppet ca, compute resource,
> etc
> > (and maybe some additional parameters).
>
> Up to this point all good. Just 1 thing, if things like puppet master
> etc… are specific per location, why not setting them on the Location
> instead of setting them on Hostgroup?
>
I looked into this. How can I set puppet master, puppet ca, capsule (since
I am using Katello) and compute resource on the location. Under the edit
Location page I can specify which smart proxies apply to a specific
location but when creating a new host that doesn't populate the Puppet
Master, CA, Capsule and compute resource drop down box.
I have been looking at a way to specify them via parameters on the location
page. Within a template you reference values like puppetmaster through the
@host.puppetmaster. Is there a way to set that via a straight parameter in
the Locations section?
If I could accomplish this it would solve almost all my issues.
>
> > I then have specific server roles (ie: activemq or webserver). These
> host
> > groups would define puppet classes, OS and compute profiles.
>
> Have you looked at config groups (configure > Puppet > config groups)?
> They allow you to group puppet classes to be applied to a host/host
> group.
>
> I realize for these specific roles, to set the OS and compute profile you'
> d still need host groups.
>
I have looked at config groups, but they are still tied to a specific host
group so don't think it solves much of what I am looking for.
>
> > The way I have it worked now is that I have to create a nested host
> group
> > for each role in each site (ie: US1/activemq, HK1/activemq, etc).
>
> That sounds sane, no? Imagine you could have multiple inheritance
> (activemq inherits from US1 & HK1) - what puppet master is applied to
> activemq, etc…?
>
Not following this. US1 and HK1 mutually exclusive so a role hostgroup (ie:
activemq) wouldn't inherit from both. Can you have multiple inheritance?
Such that I create one hostgroup activeMQ, another US1 and then inherit
from both of those to create a new hostgroup? That would essentially
accomplish assigning two hostgroups to one host.
···
On Tuesday, December 29, 2015 at 3:44:16 AM UTC-8, Daniel Lobato wrote:
> On 12/28, Matthew Ceroni wrote:
Is there a way to accomplish what I am trying without having to define
hundreds of hostgroups?
I don’t think so, config groups might help though. Setting multiple host
groups to a host sounds a bit problematic because of the conflict
resolution between host group properties.
–
Daniel Lobato Garcia
@dLobatog
blog.daniellobato.me
daniellobato.me
GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: elobato (Daniel Lobato Garcia) | Keybase