also sprach David Boucha <da...@saltstack.com> [2012.10.15.1703 +0200]:
> There are a lot of ways to target minions. Have you tried lookingNo, I have missed this part of the docs somehow, thanks. This looks
> at node groups?
> https://salt.readthedocs.org/en/latest/topics/targeting/nodegroups.html?highlight=node
better than what I thought was possible, but still requires you to
keep information about a node decentrally.
How do I query the config (as a human) for roles a node has? grep -C10?
WHAT IS YOUR NAMING SCHEME?
> nodegroups:
> group1: 'kona, africangray, darksideofthemoon, kirsch'
Yeah, but at the moment there are no grains that describe the hosts'
> You can also compose the nodegroups from grains, as well.
> Then you can refer to the nodegroups in your state files.
roles, unless I add custom grains, but that's configuring hosts
locally; I am doing configuration management because I don't want
that. ;)
Does anyone have an example of this?
> Also, Salt has support for external node classifiers, similar to puppet :
> https://salt.readthedocs.org/en/latest/ref/configuration/master.html?highlight=enc#external-nodes
I would prefer not to have to "customise" core parts of the tool
before even using it, but if this is a robust way forward, it might
just well do!
I do not use third-party providers. We don't trust anyone but
> One last thing to consider. If you are using a cloud provider such as
> Amazon EC2 or Rackspace, or others, you can use salt-cloud to create those
> servers. salt-cloud can pre-populate grains in the minion config when the
> server is created. So you could pre-populate the following:
>
> grains:
> roles:
> - webserver
> - dbserver
ourselves. ;)
also sprach David Boucha <da...@saltstack.com> [2012.10.15.2145 +0200]:
> > How do I query the config (as a human) for roles a node has? grep -C10?Say I want to find out what roles (group memberships) host
>
> salt -N group1 test.ping
>
> The above line will give you a list of minions in group1. You can
> also look in the nodegroup definition in your master config.
pepper.example.org has — I cannot look at the host definition, but
I have to search for all occurrences of the hostname in nodegroup
definitions.
On the other hand, nodegroups allow me to quickly get a feel of my
webservers etc.
The question is really just whether it makes more sense to have
a node-centric definition (which is what I prefer for now), or
a role-centric one.
I am correct in assuming that a node can be a member of multiple
groups, right?
also sprach David Boucha <da...@saltstack.com> [2012.10.16.1721 +0200]:
> Salt is very flexible. I'm sure you'll be able to find a way toThe question that immediately comes to my mind is: how likely is it,
> make it work as you'd like.
that varying paradigms will be accepted upstream? I hate to have to
maintain downstream changes…
here is how I am trying to use grains (pushed from master per host, so no need to maintain a manual copy on minion itself)
You also have hiera providers and the more generic cmd_yaml provider.
On 17/10/12 17:15, martin f. krafft wrote:
> also sprach Jason Godden <ja...@godden.id.au> [2012.10.16.2338 +0200]:
>> Your top file then references this:
>>
>> base:
>> 'roles:ferm':
>> match:pillar
>> states.muninnode
> I understand how to use pillar data, but I don't quite understand
> why you are making the muninnode state a child of a pillar match for
> ferm. Fundamentally, while every munin node will have ferm
> installed, the two have nothing to do with each other.
>
This was a typo - it should be states.ferm. The example was to
demonstrate that you can target your states based on pillar matches
providing you with the various target filter and reporting requirements
you had. This would be provided by the master_tops transformation of
your pillar data.