コード例 #1
0
def handle(name, _cfg, cloud, log, _args):
    # Comes from the following:
    # https://forums.aws.amazon.com/thread.jspa?threadID=96918
    runparts_path = os.path.join(cloud.get_cpath(), 'scripts', SCRIPT_SUBDIR)
    try:
        util.runparts(runparts_path)
    except:
        log.warn("Failed to run module %s (%s in %s)", name, SCRIPT_SUBDIR,
                 runparts_path)
        raise
コード例 #2
0
def handle(name, _cfg, cloud, log, _args):
    # Comes from the following:
    # https://forums.aws.amazon.com/thread.jspa?threadID=96918
    runparts_path = os.path.join(cloud.get_cpath(), 'scripts', SCRIPT_SUBDIR)
    try:
        util.runparts(runparts_path)
    except Exception:
        log.warn("Failed to run module %s (%s in %s)",
                 name, SCRIPT_SUBDIR, runparts_path)
        raise
コード例 #3
0
def handle(name, _cfg, cloud, log, _args):
    # This is written to by the user data handlers
    # Ie, any custom shell scripts that come down
    # go here...
    runparts_path = os.path.join(cloud.get_ipath_cur(), SCRIPT_SUBDIR)
    try:
        util.runparts(runparts_path)
    except Exception:
        log.warn("Failed to run module %s (%s in %s)", name, SCRIPT_SUBDIR,
                 runparts_path)
        raise
コード例 #4
0
def handle(name, _cfg, cloud, log, _args):
    # This is written to by the user data handlers
    # Ie, any custom shell scripts that come down
    # go here...
    runparts_path = os.path.join(cloud.get_ipath_cur(), SCRIPT_SUBDIR)
    try:
        util.runparts(runparts_path)
    except Exception:
        log.warn("Failed to run module %s (%s in %s)",
                 name, SCRIPT_SUBDIR, runparts_path)
        raise
コード例 #5
0
def handle(name, cfg, cloud, log, _args):
    # This is written to by the vendor data handlers
    # any vendor data shell scripts get placed in runparts_path
    runparts_path = os.path.join(cloud.get_ipath_cur(), 'scripts',
                                 SCRIPT_SUBDIR)

    prefix = util.get_cfg_by_path(cfg, ('vendor_data', 'prefix'), [])

    try:
        util.runparts(runparts_path, exe_prefix=prefix)
    except:
        log.warn("Failed to run module %s (%s in %s)",
                 name, SCRIPT_SUBDIR, runparts_path)
        raise
コード例 #6
0
def handle(_name, _cfg, _cloud, log, _args):
    try:
        util.runparts(runparts_path)
    except:
        log.warn("failed to run-parts in %s" % runparts_path)
        raise