def device_get_from_facts(module, device_name):
    """
    Get device information from CVP facts.

    Parameters
    ----------
    module : AnsibleModule
        Ansible module.
    device_name : string
        Hostname to search in facts.

    Returns
    -------
    dict
        Device facts if found, else None.
    """
    for device in module.params["cvp_facts"]["devices"]:
        if device["hostname"] == device_name:
            return device
    return None