def format_yaml(template, config):
    """
    Replace in ${ENV_VAR} in template with value
    """
    formatted = template
    for k, v in config.items():
        formatted = formatted.replace('${%s}' % k, v)
    return formatted
