import yaml


def extractYAML(yaml_file):
    """This function extracts YAML vars from a YAML file.

    Args:
        yaml_file (string): String containing the path to YAML file.

    Returns:
        dictionary: Returns a dictionary with all values parsed from YAML file.
    """
    try:
        with open(yaml_file) as var_file:
            yaml_output = yaml.load(var_file, Loader=yaml.FullLoader)
        return (yaml_output)
    except:
        print('Extracting YAML encountered an error')