mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Added the 'master' grain to give the minion it's master
This commit is contained in:
parent
3a987b1502
commit
bada5b3d57
@ -931,3 +931,13 @@ def get_server_id():
|
||||
# Provides:
|
||||
# server_id
|
||||
return {'server_id': abs(hash(__opts__.get('id', '')) % (2 ** 31))}
|
||||
|
||||
def get_master():
|
||||
'''
|
||||
Provides the minion with the name of it's master.
|
||||
This is useful in states to target other services running on the master.
|
||||
'''
|
||||
# Provides:
|
||||
# master
|
||||
return {'master': __opts__.get('master', '')}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user