mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
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:
parent
8c142f3958
commit
c4884a4428
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user