mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
support amazon linux 2 for service module
This commit is contained in:
parent
454ed23f62
commit
37e067c7b5
@ -97,6 +97,15 @@ def __virtual__():
|
||||
'RedHat-based distros >= version 7 use systemd, will not '
|
||||
'load rh_service.py as virtual \'service\''
|
||||
)
|
||||
if __grains__['os'] == 'Amazon':
|
||||
if int(osrelease_major) in (2016, 2017):
|
||||
return __virtualname__
|
||||
else:
|
||||
return (
|
||||
False,
|
||||
'Amazon Linux >= version 2 use systemd, will not '
|
||||
'load rh_service.py as virtual \'service\''
|
||||
)
|
||||
return __virtualname__
|
||||
return (False, 'Cannot load rh_service module: OS not in {0}'.format(enable))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user