Add __virtual__ function to new apt state module

I was waiting on this change from @holmboe before I merged #7085. Since
it has now been merged, here is the __virtual__ function to which I was
referring.
This commit is contained in:
Erik Johnson 2013-09-05 22:01:37 -05:00
parent 8c142f3958
commit c4884a4428

View File

@ -7,6 +7,13 @@ import salt.utils
log = logging.getLogger(__name__)
def __virtual__():
'''
Only work on apt-based platforms with pkg.get_selections
'''
return 'apt' if 'pkg.get_selections' in __salt__ else False
def held(name):
'''
Set package in 'hold' state, meaning it will not be upgraded.