gcore / gcore.cloud / 1.0.1 / module / volume_info Gather infos about all GCore volumes. Authors: GCore (@GCore)gcore.cloud.volume_info (1.0.1) — module
Install with ansible-galaxy collection install gcore.cloud:==1.0.1
collections: - name: gcore.cloud version: 1.0.1
Gather infos about all GCore volumes.
- name: Gather gcore volumes info gcore.cloud.volume_info: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}"
- name: Gather gcore specific volume info gcore.cloud.volume_info: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" volume_id: "{{ volume_id }}"
limit: description: - Limit the number of returned volumes 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 id_part: description: - Filter the volume list result by the ID part of the volume required: false 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 bootable: description: - Filter by a bootable field required: false type: bool name_part: description: - Filter out volumes by name_part inclusion in volume name required: false 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 volume_id: description: - The ID of volume you want to get. - The module will fail if the provided ID is invalid. required: false type: str cluster_id: description: - Can be used to only show volumes of a specific k8s cluster required: false type: str metadata_k: description: - Filter by metadata keys. Must be a valid JSON string 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 instance_id: description: - Can be used to only show volumes of a specific instance required: false type: str metadata_kv: description: - Filter by metadata key-value pairs. Must be a valid JSON string required: false type: str 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 has_attachments: description: - Filter by the presence of attachments required: false type: bool
volume_info: contains: attachments: description: Attachment list returned: if available sample: - attached_at: '2019-07-26T14:22:03.000000' attachment_id: f2ed59d9-8068-400c-be4b-c4501ef6f33c device: /dev/vda instance_name: '123' server_id: 8dc30d49-bb34-4920-9bbd-03a2587ec0ad volume_id: 67baa7d1-08ea-4fc5-bef2-6b2465b7d227 type: list bootable: description: Bootable boolean flag returned: if available sample: false type: bool created_at: description: Datetime when the volume was created returned: always sample: 2019-05-29T05:32:41+0000 type: str creator_task_id: description: Task that created this entity returned: if available sample: d74c2bb9-cea7-4b23-a009-2f13518ae66d type: str device: description: Device name returned: if available sample: test type: str id: description: Volume ID returned: always sample: 726ecfcc-7fd0-4e30-a86e-7892524aa483 type: str is_root_volume: description: Root volume flag returned: if available sample: false type: bool limiter_stats: description: Snapshots of this volume returned: if available sample: MBps_base_limit: 10 MBps_burst_limit: 100 iops_base_limit: 12 iops_burst_limit: 120 type: dict metadata: description: Metadata returned: if available sample: attached_mode: rw task_id: d74c2bb9-cea7-4b23-a009-2f13518ae66d type: dict metadata_detailed: description: Volume metadata returned: if available sample: - key: attached_mode read_only: true value: rw type: list name: description: Volume name returned: always sample: 123 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 size: description: Volume size, GiB returned: always sample: 2 type: int snapshot_ids: description: Snapshots of this volume returned: if available sample: - 907a87b0-7b63-4fd5-beb3-5ab4ba445c93 type: list status: description: Volume status returned: always sample: available 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 volume was last updated returned: always sample: 2019-05-29T05:39:20+0000 type: str volume_image_metadata: description: Image information for volumes that were created from image returned: if available sample: checksum: ba3cd24377dde5dfdd58728894004abb container_format: bare disk_format: raw image_id: 723037e2-ec6d-47eb-92de-6276c8907839 image_name: cirros-gcloud min_disk: '1' min_ram: '0' owner_specified.openstack.md5: ba3cd24377dde5dfdd58728894004abb owner_specified.openstack.object: images/cirros-gcloud owner_specified.openstack.sha256: 87ddf8eea6504b5eb849e418a568c4985d3cea59b5a5d069e1dc644de676b4ec size: '46137344' type: dict volume_type: description: Volume type returned: always sample: standard type: str description: - When I(volume_id) is passed, it is a dict of resource. - Otherwise it is a list of dictionaries. returned: always type: complex