Search code examples
salt-project

SaltStack nodegroups with more than one host results in an error


First the facts:

  • Debian GNU/Linux 8.6 (jessie)
  • salt-master 2016.3.3 (Boron)
  • salt-minion 2016.3.3 (Boron)

I tried to use nodegroups as described here.

nodegroups:
  web: 'salt-master1,salt-master2'

If I run ...

salt -N web test.ping

... it results in:

No minions matched the target. No command was sent, no jid was assigned.
ERROR: No return received

Changed my nodegroup to:

nodegroups:
  web: 'salt-master1'

Voila ...

salt-minion1:
True

I also tried the other notations to define a nodegroup as described in the linked documentation.

How i get it work with more than one host?


Solution

  • I recognized my fault.

    Did not realize the L@ notation is explicit for a list of hosts.

    Solution for interesting people:

    nodegroups:
      web: 'L@salt-master1,salt-master2'
    

    results in:

    salt-minion1:
    True
    salt-minion2:
    True