mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Using salt util function to determine if OS X
This commit is contained in:
parent
bae0543d95
commit
269ba6088a
@ -8,6 +8,8 @@ Install certificates into the keychain on Mac OS
|
||||
import logging
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
__virtualname__ = 'keychain'
|
||||
|
||||
@ -16,7 +18,7 @@ def __virtual__():
|
||||
'''
|
||||
Only work on Mac OS
|
||||
'''
|
||||
if __grains__['os'] in ['MacOS', 'Darwin']:
|
||||
if salt.utils.is_darwin():
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
|
@ -17,15 +17,17 @@ import logging
|
||||
import os
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
__virtualname__ = 'keychain'
|
||||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
Only work on Mac OS
|
||||
'''
|
||||
if __grains__['os'] in ['MacOS', 'Darwin']:
|
||||
if salt.utils.is_darwin():
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user