Skip to content

[Bug]: region_list does not with with an ID filter as in the docs #557

Open
@enygren

Description

@enygren

Ansible Version

ansible [core 2.13.10]

Ansible Configuration

No response

Effected Components

region_list

Expected Behavior

Should have filtered to return a specific region by id

Actual Behavior

Errors that id is not a valid filter

Steps to Reproduce

Sample task:

    - name: Get region information
      linode.cloud.region_list:
        api_token: "{{ linode.api_token }}"
        filters:
          - name: id
            values: us-east
      register: region_result

fails with:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_url": "https://api.linode.com/",
            "api_version": "v4",
            "ca_path": null,
            "count": null,
            "filters": [
                {
                    "name": "id",
                    "values": [
                        "us-east"
                    ]
                }
            ],
            "label": null,
            "order": "asc",
            "order_by": null,
            "state": null,
            "tags": null,
            "ua_prefix": null
        }
    },
    "msg": "Error from Linode API: [400] Cannot filter on id"
}

Although this example comes directly from:

https://github.com/linode/ansible_linode/blob/dev/docs/modules/region_list.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissues that report a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions