gcore / gcore.cloud / 1.0.1 / module / instance_quota_info Check quota for instance creation. Authors: GCore (@GCore)gcore.cloud.instance_quota_info (1.0.1) — module
Install with ansible-galaxy collection install gcore.cloud:==1.0.1
collections: - name: gcore.cloud version: 1.0.1
Check quota for instance creation.
- name: Check quota before create instance gcore.cloud.instance_quota_info: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" flavor: g1-standard-1-2 names: ['inst1', 'inst2'] volumes: [ {'size': 10, 'source': 'image', 'type_name': 'ssd_hiiops'}, {'size': 5, 'source': 'new-volume', 'type_name': 'standard'}, {'snapshot_id': '7cca40d7-a843-4e9f-ae08-62b9a394b1ab', 'source': 'snapshot'}, ] interfaces: [ { 'network_id': '783b36b4-3ef4-48ac-879d-5b3ea53180d8', 'subnet_id': '382a83e5-1b38-49f9-bd83-730353b29ed4', 'type': 'subnet', }, {'type': 'external'} ]
names: description: - List of instance names. - Optional. Used if I(name_templates) is not passed. elements: str required: false type: list flavor: description: - Flavor name. required: true type: str api_key: description: - GCore API auth key - Can be passed as I(CLOUD_API_KEY) environment variable. type: str volumes: description: - Volumes configuration. elements: dict required: true type: list 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 interfaces: description: - Subnet IPs and floating IPs. elements: dict required: true type: list 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 name_templates: description: - List of instance name templates. - Optional. Used if I(names) is not passed. elements: str required: false type: list
instance_info: description: - If the quota is not exceeded, then the response will be an empty dictionary. - Dictionary of quotas. returned: if available sample: baremetal_basic_count_limit: 0 baremetal_basic_count_requested: 1 baremetal_basic_count_usage: 0 baremetal_gpu_count_limit: 0 baremetal_gpu_count_requested: 1 baremetal_gpu_count_usage: 0 baremetal_hf_count_limit: 0 baremetal_hf_count_requested: 1 baremetal_hf_count_usage: 0 baremetal_infrastructure_count_limit: 0 baremetal_infrastructure_count_requested: 1 baremetal_infrastructure_count_usage: 0 baremetal_network_count_limit: 0 baremetal_network_count_requested: 1 baremetal_network_count_usage: 0 baremetal_storage_count_limit: 0 baremetal_storage_count_requested: 1 baremetal_storage_count_usage: 0 cluster_count_limit: 0 cluster_count_requested: 1 cluster_count_usage: 0 cpu_count_limit: 0 cpu_count_requested: 1 cpu_count_usage: 0 dbaas_postgres_cluster_count_limit: 0 dbaas_postgres_cluster_count_requested: 1 dbaas_postgres_cluster_count_usage: 0 external_ip_count_limit: 0 external_ip_count_requested: 1 external_ip_count_usage: 0 faas_cpu_count_limit: 0 faas_cpu_count_requested: 1 faas_cpu_count_usage: 0 faas_function_count_limit: 0 faas_function_count_requested: 1 faas_function_count_usage: 0 faas_namespace_count_limit: 0 faas_namespace_count_requested: 1 faas_namespace_count_usage: 0 faas_ram_size_limit: 0 faas_ram_size_requested: 1 faas_ram_size_usage: 0 firewall_count_limit: 0 firewall_count_requested: 1 firewall_count_usage: 0 floating_count_limit: 0 floating_count_requested: 1 floating_count_usage: 0 gpu_count_limit: 0 gpu_count_requested: 1 gpu_count_usage: 0 image_count_limit: 0 image_count_requested: 1 image_count_usage: 0 image_size_limit: 0 image_size_requested: 1 image_size_usage: 0 ipu_count_limit: 0 ipu_count_requested: 1 ipu_count_usage: 0 laas_topic_count_limit: 0 laas_topic_count_requested: 1 laas_topic_count_usage: 0 loadbalancer_count_limit: 0 loadbalancer_count_requested: 1 loadbalancer_count_usage: 0 network_count_limit: 0 network_count_requested: 1 network_count_usage: 0 ram_limit: 0 ram_requested: 1 ram_usage: 0 router_count_limit: 0 router_count_requested: 1 router_count_usage: 0 secret_count_limit: 0 secret_count_requested: 1 secret_count_usage: 0 servergroup_count_limit: 0 servergroup_count_requested: 1 servergroup_count_usage: 0 sfs_count_limit: 0 sfs_count_requested: 1 sfs_count_usage: 0 sfs_size_limit: 0 sfs_size_requested: 1 sfs_size_usage: 0 shared_vm_count_limit: 0 shared_vm_count_requested: 1 shared_vm_count_usage: 0 snapshot_schedule_count_limit: 0 snapshot_schedule_count_requested: 1 snapshot_schedule_count_usage: 0 subnet_count_limit: 0 subnet_count_requested: 1 subnet_count_usage: 0 vm_count_limit: 0 vm_count_requested: 1 vm_count_usage: 0 volume_count_limit: 0 volume_count_requested: 1 volume_count_usage: 0 volume_size_limit: 0 volume_size_requested: 1 volume_size_usage: 0 volume_snapshots_count_limit: 0 volume_snapshots_count_requested: 1 volume_snapshots_count_usage: 0 volume_snapshots_size_limit: 0 volume_snapshots_size_requested: 1 volume_snapshots_size_usage: 0 type: dict