Advertisement
Guest User

Untitled

a guest
Apr 14th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. # Solve the Chicken and egg problem where grains need to run before any
  4. # of the modules are loaded and are generally available for any usage.
  5. import salt.modules.grain
  6.  
  7. __salt__ = {
  8.     'grain.get': salt.modules.grain.get
  9. }
  10.  
  11. def minion_metadata():
  12.     return {
  13.         'role': __salt__['grain.get']("id").split(".")[0]
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement