add virtual function

This commit is contained in:
Erik Johnson 2014-10-30 15:42:55 -06:00
parent 8d2d885f62
commit 5a84887c4c

View File

@ -12,6 +12,17 @@ from contextlib import closing
log = logging.getLogger(__name__)
__virtualname__ = 'archive'
def __virtual__():
'''
Only load if the npm module is available in __salt__
'''
return __virtualname__ \
if [x for x in __salt__ if x.startswith('archive.')] \
else False
def extracted(name,
source,