Skip to content

Instantly share code, notes, and snippets.

@mbunkus
Created September 4, 2015 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbunkus/7b83506698c295c435e5 to your computer and use it in GitHub Desktop.
Save mbunkus/7b83506698c295c435e5 to your computer and use it in GitHub Desktop.
# Total number of minions registered: 15. Looks good:
[0 root@bellerophon ~] salt --out=raw -C '*' grains.item os|wc -l
15
# Positive matches against the OS work nicely, and their sum equals the number 15 above:
[0 root@bellerophon ~] salt --out=raw -C '* and G@os:Ubuntu' grains.item os|wc -l
9
[0 root@bellerophon ~] salt --out=raw -C '* and G@os:Univention' grains.item os|wc -l
4
[0 root@bellerophon ~] salt --out=raw -C '* and G@os:CentOS' grains.item os|wc -l
2
# »not CentOS« should logically be all Univention and all Ubuntu
# minions = 13, but it's not:
[0 root@bellerophon ~] salt --out=raw -C '* and not G@os:CentOS' grains.item os|wc -l
9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment