mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #7405 from terminalmage/issue7371
Don't make pkg/service states available unless provider module is loaded
This commit is contained in:
commit
b60c5b065e
@ -61,6 +61,14 @@ if salt.utils.is_windows():
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
Only make these states available if a pkg provider has been detected or
|
||||
assigned for this minion
|
||||
'''
|
||||
return 'pkg' if 'pkg.install' in __salt__ else False
|
||||
|
||||
|
||||
def __gen_rtag():
|
||||
'''
|
||||
Return the location of the refresh tag
|
||||
|
@ -39,9 +39,10 @@ service, then set the reload value to True:
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
Ensure that the service state returns the correct name
|
||||
Only make these states available if a service provider has been detected or
|
||||
assigned for this minion
|
||||
'''
|
||||
return 'service'
|
||||
return 'service' if 'service.start' in __salt__ else False
|
||||
|
||||
|
||||
def _enabled_used_error(ret):
|
||||
|
Loading…
Reference in New Issue
Block a user