Added the 'master' grain to give the minion it's master

This commit is contained in:
Alan Garfield 2013-05-01 11:41:45 +10:00
parent 3a987b1502
commit bada5b3d57

View File

@ -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', '')}