Add virtual function to load mysql_database

Only load if mysql module is availble
This commit is contained in:
Thomas S Hatch 2012-05-26 20:00:28 -06:00
parent 1fa592bf0e
commit 40ca27bd70

View File

@ -12,6 +12,13 @@ Databases can be set as either absent or present
'''
def __virtual__():
'''
Only load if the mysql module is available in __salt__
'''
return 'mysql_database' if 'mysql.db_exists' in __salt__ else False
def present(name):
'''
Ensure that the named database is present with the specified properties