def main(noreboot='false', **kwargs):
    '\n    Master script that calls content scripts to be deployed when provisioning systems\n    '
    scriptname = ''
    if ('__file__' in dir()):
        scriptname = os.path.abspath(__file__)
    else:
        scriptname = os.path.abspath(sys.argv[0])
    noreboot = ('true' == noreboot.lower())
    sourceiss3bucket = ('true' == kwargs.get('sourceiss3bucket', 'false').lower())
    print(('+' * 80))
    print('Entering script -- {0}'.format(scriptname))
    print('Printing parameters --')
    print('    noreboot = {0}'.format(noreboot))
    for (key, value) in kwargs.items():
        print('    {0} = {1}'.format(key, value))
    system = platform.system()
    systemparams = get_system_params(system)
    scriptstoexecute = get_scripts_to_execute(system, systemparams['workingdir'], **kwargs)
    for script in scriptstoexecute:
        url = script['ScriptSource']
        filename = url.split('/')[(- 1)]
        fullfilepath = ((systemparams['workingdir'] + systemparams['pathseparator']) + filename)
        download_file(url, fullfilepath, sourceiss3bucket)
        print(('Running script -- ' + script['ScriptSource']))
        print('Sending parameters --')
        for (key, value) in script['Parameters'].items():
            print('    {0} = {1}'.format(key, value))
        paramstring = ' '.join((("%s='%s'" % (key, val)) for (key, val) in script['Parameters'].iteritems()))
        fullcommand = 'python {0} {1}'.format(fullfilepath, paramstring)
        result = os.system(fullcommand)
        if (result is not 0):
            message = 'Encountered an unrecoverable error executing a content script. Exiting with failure.\nCommand executed: {0}'.format(fullcommand)
            raise SystemError(message)
    cleanup(systemparams['workingdir'])
    if noreboot:
        print('Detected `noreboot` switch. System will not be rebooted.')
    else:
        print('Reboot scheduled. System will reboot after the script exits.')
        os.system(systemparams['restart'])
    print('{0} complete!'.format(scriptname))
    print(('-' * 80))
Master script that calls content scripts to be deployed when provisioning systems
def main(noreboot='false', **kwargs):
    '\n    \n    '
    scriptname = 
    if ('__file__' in dir()):
        scriptname = os.path.abspath(__file__)
    else:
        scriptname = os.path.abspath(sys.argv[0])
    noreboot = ('true' == noreboot.lower())
    sourceiss3bucket = ('true' == kwargs.get('sourceiss3bucket', 'false').lower())
    print(('+' * 80))
    print('Entering script -- {0}'.format(scriptname))
    print('Printing parameters --')
    print('    noreboot = {0}'.format(noreboot))
    for (key, value) in kwargs.items():
        print('    {0} = {1}'.format(key, value))
    system = platform.system()
    systemparams = get_system_params(system)
    scriptstoexecute = get_scripts_to_execute(system, systemparams['workingdir'], **kwargs)
    for script in scriptstoexecute:
        url = script['ScriptSource']
        filename = url.split('/')[(- 1)]
        fullfilepath = ((systemparams['workingdir'] + systemparams['pathseparator']) + filename)
        download_file(url, fullfilepath, sourceiss3bucket)
        print(('Running script -- ' + script['ScriptSource']))
        print('Sending parameters --')
        for (key, value) in script['Parameters'].items():
            print('    {0} = {1}'.format(key, value))
        paramstring = ' '.join((("%s='%s'" % (key, val)) for (key, val) in script['Parameters'].iteritems()))
        fullcommand = 'python {0} {1}'.format(fullfilepath, paramstring)
        result = os.system(fullcommand)
        if (result is not 0):
            message = 'Encountered an unrecoverable error executing a content script. Exiting with failure.\nCommand executed: {0}'.format(fullcommand)
            raise SystemError(message)
    cleanup(systemparams['workingdir'])
    if noreboot:
        print('Detected `noreboot` switch. System will not be rebooted.')
    else:
        print('Reboot scheduled. System will reboot after the script exits.')
        os.system(systemparams['restart'])
    print('{0} complete!'.format(scriptname))
    print(('-' * 80))