def dump(file_path, yaml, objyaml):
    """Write the value of objyaml into file path."""
    def start_end_lines(input_str):
        """Return formatted string"""
        return "---\n{0}---\n".format(input_str)
    with open(file_path, 'w') as target_yaml_file:
        yaml.dump(objyaml, target_yaml_file, transform=start_end_lines)