Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # Solve the Chicken and egg problem where grains need to run before any
- # of the modules are loaded and are generally available for any usage.
- import salt.modules.grain
- __salt__ = {
- 'grain.get': salt.modules.grain.get
- }
- def minion_metadata():
- return {
- 'role': __salt__['grain.get']("id").split(".")[0]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement