gcore.cloud.router_info (1.0.1) — module

Gather infos about all GCore routers.

Authors: GCore (@GCore)

Install collection

Install with ansible-galaxy collection install gcore.cloud:==1.0.1


Add to requirements.yml

  collections:
    - name: gcore.cloud
      version: 1.0.1

Description

Gather infos about all GCore routers.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather gcore routers info
  gcore.cloud.router_info:
    api_key: "{{ api_key }}"
    region_id: "{{ region_id }}"
    project_id: "{{ project_id }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather gcore specific router info
  gcore.cloud.router_info:
    api_key: "{{ api_key }}"
    region_id: "{{ region_id }}"
    project_id: "{{ project_id }}"
    router_id: "{{ router_id }}"

Inputs

    
limit:
    description:
    - Limit the number of returned limit request entities.
    required: false
    type: int

offset:
    description:
    - Offset value is used to exclude the first set of records from the result.
    required: false
    type: int

api_key:
    description:
    - GCore API auth key
    - Can be passed as I(CLOUD_API_KEY) environment variable.
    type: str

api_host:
    default: https://api.gcore.com/cloud
    description:
    - GCore API base host
    - Can be passed as I(CLOUD_API_HOST) environment variable.
    type: str

region_id:
    description:
    - GCore API region ID
    - Required if I(region_name) is not passed
    - Can be passed as I(CLOUD_REGION_ID) environment variable.
    type: int

router_id:
    description:
    - The ID of the router you want to get.
    - The module will fail if the provided ID is invalid.
    required: false
    type: str

project_id:
    description:
    - GCore API project ID
    - Required if I(project_name) is not passed
    - Can be passed as I(CLOUD_PROJECT_ID) environment variable.
    type: int

api_timeout:
    default: 30
    description:
    - Timeout in seconds to polling GCore API
    type: int

region_name:
    description:
    - GCore API region name
    - Required if I(region_id) is not passed
    - Can be passed as I(CLOUD_REGION_NAME) environment variable.
    type: str

project_name:
    description:
    - GCore API project name
    - Required if I(project_id) is not passed
    - Can be passed as I(CLOUD_PROJECT_NAME) environment variable.
    type: str

Outputs

router_info:
  contains:
    created_at:
      description: Datetime when the router was created
      returned: always
      sample: 2023-11-09T10:34:23+0000
      type: str
    creator_task_id:
      description: Task that created this entity
      returned: always
      sample: 4d7bc56d-9b2e-46be-8a6e-e0f8102c5cc5
      type: str
    external_gateway_info:
      description: State of this router's external gateway
      returned: always
      sample:
        enable_snat: true
        external_fixed_ips:
        - ip_address: 10.94.77.162
          subnet_id: db5ebada-a86a-4702-8a19-00b23a1acb05
        network_id: 340d7d54-e165-4d83-b99c-103ce0e6efa7
      type: dict
    id:
      description: Router ID
      returned: always
      sample: 4d380efe-aecd-4aa1-82a8-573632ed37f9
      type: str
    interfaces:
      description: List of router interfaces
      elements: dict
      returned: always
      sample:
      - subnet_id: d0a6bd13-81b9-415b-8362-b3f711baf6ac
        type: subnet
      type: list
    name:
      description: Router name
      returned: always
      sample: router_1
      type: str
    project_id:
      description: Project ID
      returned: always
      sample: 1
      type: int
    region:
      description: Region name
      returned: always
      sample: Luxembourg 1
      type: str
    region_id:
      description: Region ID
      returned: always
      sample: 1
      type: int
    routes:
      description: List of custom routes
      elements: dict
      returned: always
      sample:
      - destination: 10.0.3.0/24
        nexthop: 10.0.0.13
      type: list
    status:
      description: Status of the router
      returned: always
      sample: ACTIVE
      type: str
    task_id:
      description: Active task. If None, action has been performed immediately in
        the request itself
      returned: present
      sample: 907a87b0-7b63-4fd5-beb3-5ab4ba445c93
      type: str
    updated_at:
      description: Datetime when the router was last updated
      returned: always
      sample: 2023-11-09T10:34:24+0000
      type: str
  description:
  - When I(router_id) is passed, it is a dict of resource.
  - Otherwise it is a list of dictionaries.
  returned: always
  type: complex

See also