Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- def minion_metadata():
- minion_id = open("/etc/salt/minion_id","r").read().replace('\n', '')
- try:
- env, role, idx = minion_id.split('.')
- except Exception:
- return {}
- return {
- 'env': env,
- 'role': role,
- 'idx': idx
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement