Advertisement
Guest User

Untitled

a guest
Feb 15th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. # qa-tool-util has the "kibana" role
  2. my_user@salt-master:~$ sudo salt -C "qa-tool-util" grains.get role
  3. qa-tool-util:
  4. ...
  5. - kibana
  6. ...
  7.  
  8. # qa-tool-util is in the "qa" environment
  9. my_user@salt-master:~$ sudo salt -C "qa-tool-util" grains.get environment
  10. qa-tool-util:
  11. qa
  12.  
  13. # A compound matcher on both of those conditions returns nothing.
  14. my_user@salt-master:~$ sudo salt -C "G@role:kibana and G@environment:qa" test.ping
  15. No minions matched the target. No command was sent, no jid was assigned.
  16. ERROR: No return received
  17.  
  18. # Opposite conditions, same thing.
  19. my_user@salt-master:~$ sudo salt -C "G@environment:qa and G@role:kibana" test.ping
  20. No minions matched the target. No command was sent, no jid was assigned.
  21. ERROR: No return received
  22.  
  23. # Matcher for just role works.
  24. my_user@salt-master:~$ sudo salt -C "G@role:kibana" test.ping
  25. ...
  26. qa-tool-util:
  27. True
  28. ...
  29.  
  30. # Matcher for just environment works.
  31. my_user@salt-master:~$ sudo salt -C "G@environment:qa" test.ping | grep tool-util
  32. qa-tool-util:
  33.  
  34. # (jackie)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement