def map_type(ansible_type: str) -> str:
    """Return JSON date type for a given Ansible type."""
    # https://json-schema.org/understanding-json-schema/reference/type.html
    # raw is used for file mode by ansible
    if ansible_type in ['str', 'filename', 'path', 'raw', 'sid']:
        return 'string'
    if ansible_type == 'list':
        return 'array'
    if ansible_type == 'bool':
        return 'boolean'
    if ansible_type == 'int':
        return 'integer'
    if ansible_type in ['dict', 'jsonarg', 'json']:
        return 'object'
    if ansible_type == 'float':
        return 'number'
    raise NotImplementedError(
        f"Unable to map ansible type {ansible_type} to JSON Schema type."
    )