serverscom / serverscom.sc_api / 0.1.0 / module / sc_cloud_computing_instances_info List of cloud computing instances | "added in version" 1.0.0 of serverscom.sc_api" Authors: George Shuklin (@amarao) preview | supported by communityserverscom.sc_api.sc_cloud_computing_instances_info (0.1.0) — module
Install with ansible-galaxy collection install serverscom.sc_api:==0.1.0
collections: - name: serverscom.sc_api version: 0.1.0
Return list of all instances in a given region
- name: List all flavors sc_cloud_computing_instances_info: token: '{{ sc_token }}' region_id: 0 register: flavors
- name: List all instances in the region debug: var=sc_cloud_computing_instances_info.cloud_instances
token: description: - Token to use. - You can create token for you account in https://portal.servers.com in Profile -> Public API section. required: true type: str endpoint: default: https://api.servers.com/v1 description: - Endpoint to use to connect to API. - Do not change until specifically asked to do otherwise. type: str region_id: description: - Id of cloud computing region to filter. - Use I(serverscom.sc_api.sc_cloud_computing_regions_info) module to retrive list of available regions. - Module returns instances for all regions if I(region_id) is not specified. type: int
api_url: description: URL for the failed request returned: on failure type: str cloud_instances: contains: created_at: description: - Date of creation of the instance. type: str flavor_id: description: - Id of the instance's flavor. type: str flavor_name: description: - Human-readable name of the instance's flavor. type: str gpn_enabled: description: - Flag is Global Private Network was enabled for instance. - Flag may not prepresent private_ipv4_address if private interface was detached via Openstack API. type: bool id: description: - Id of the instance. type: str image_id: description: - Id of the image or snapshot used for instance build/rebuild. type: str image_name: description: - Name of the image. - May be absent if image was removed. type: str ipv6_enabled: description: - Flag if IPv6 was enabled for instance. type: bool name: description: - Name of the instance. type: str openstack_uuid: description: - UUID of the instance in the Openstack API. - May be missing at some stages of lifecycle. type: str private_ipv4_address: description: - IPv4 address for instance. - May be missing if no private network is connected to the instance. type: str public_ipv4_address: description: - IPv4 address for instance. - May be missing if public inteface was detached via Openstack API. type: str public_ipv6_address: description: - IPv5 address for instance. - May be missing if no IPv6 address was ordered or public inteface was detached via Openstack API. type: str region_code: description: - Human-readable code for region. type: str region_id: description: - Id of the region. - Same as in I(region_id). type: int status: description: - Current status for the instance. - ACTIVE - a normal, operational status of a cloud instance. - SWITCHED_OFF, SWITCHING_OFF, SWITCHING_ON, REBOOTING - power states for ACTIVE instance. - PENDING - order for new instance is been processed. - CREATING, BUILDING, REBUILDING, PROVISIONING, DELETING and DELETED stages of lifecycle. - AWAITING_UPGRADE_CONFIRM - instance is waiting for confirm (instances are autoconfirm in 72hr.) - UPGRADING, REVERTING_UPGRADE - stages of upgrade lifecycle. - CREATING_SNAPSHOT - Instance snapshot is creating. - BUSY - Instance is not available for API operations. - ERROR - Instance was failed or wasn't created. - KEYPAIR_NOT_FOUND - SSH key wasn't found, please check if you are using a correct key. - QUOTA_EXCEEDED - at creation time, chosen flavor exceeded quota. Please contact support for raising quota. - RESCUING, RESCUE - states for rescue operation for instance. type: str updated_at: description: - Date of last update for the instance. type: str description: - List of available flavors for region. returned: on success type: complex status_code: description: Status code for the request returned: always type: int