Ejemplo n.º 1
0
def deploy_files(filenames, local_dir, remote_dir, user_group, mode=0600):
    _LOGGER.info('Deploying configurations for ' + str(filenames))
    sudo('mkdir -p ' + remote_dir)
    for name in filenames:
        put_secure(user_group,
                   mode,
                   os.path.join(local_dir, name),
                   remote_dir,
                   use_sudo=True)
Ejemplo n.º 2
0
def deploy_files(filenames, local_dir, remote_dir, user_group, mode=0600):
    _LOGGER.info('Deploying configurations for ' + str(filenames))
    secure_create_directory(remote_dir, PRESTO_STANDALONE_USER_GROUP)
    for name in filenames:
        put_secure(user_group,
                   mode,
                   os.path.join(local_dir, name),
                   remote_dir,
                   use_sudo=True)
Ejemplo n.º 3
0
def deploy_all(source_directory, should_warn=True):
    host_config_dir = os.path.join(source_directory, env.host)
    for file_name in ALL_CONFIG:
        local_config_file = os.path.join(host_config_dir, file_name)
        if not os.path.exists(local_config_file):
            if should_warn:
                warn("No configuration file found for %s at %s"
                     % (env.host, local_config_file))
            continue
        remote_config_file = os.path.join(constants.REMOTE_CONF_DIR, file_name)
        put_secure(PRESTO_STANDALONE_USER_GROUP, 0644, local_config_file,
                   remote_config_file, use_sudo=True)
Ejemplo n.º 4
0
def deploy_files(filenames, local_dir, remote_dir, user_group, mode=0600):
    _LOGGER.info('Deploying configurations for ' + str(filenames))
    sudo('mkdir -p ' + remote_dir)
    for name in filenames:
        put_secure(user_group, mode, os.path.join(local_dir, name), remote_dir,
                   use_sudo=True)
Ejemplo n.º 5
0
def deploy_files(filenames, local_dir, remote_dir, user_group, mode=0600):
    _LOGGER.info('Deploying configurations for ' + str(filenames))
    secure_create_directory(remote_dir, PRESTO_STANDALONE_USER_GROUP)
    for name in filenames:
        put_secure(user_group, mode, os.path.join(local_dir, name), remote_dir,
                   use_sudo=True)