Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import Python libs
- try:
- import pythoncom
- HAS_DEPENDENCIES = True
- except ImportError:
- HAS_DEPENDENCIES = False
- import salt.utils
- import salt
- import os
- import logging
- log = logging.getLogger(__name__)
- print locals()
- try:
- from urllib2 import urlopen, URLError, HTTPError
- HAS_URLLIB2 = True
- except:
- HAS_URLLIB2 = False
- def __virtual__():
- if HAS_URLLIB2 is True:
- return 'download'
- return False
- if __grains__['kernel'] == 'Linux':
- download_location = '/opt/salt/packages/'
- space_cmd = 'df -P ' + download_location
- execute_cmd = 'sh'
- unpack_cmd = 'tar -xvf'
- os.chdir(download_location)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement