serverscom / serverscom.sc_api / 0.1.0 / module / sc_cloud_computing_instance_info Information about cloud computing instance | "added in version" 1.0.0 of serverscom.sc_api" Authors: George Shuklin (@amarao) preview | supported by communityserverscom.sc_api.sc_cloud_computing_instance_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 information about cloud computing instance.
- name: List all flavors sc_cloud_computing_instance_info: token: '{{ sc_token }}' instance_id: M7e5Ba2v register: instance
- name: Print information about instance debug: msg: | Instance {{ instance.name }} has IP {{ instance.public_ipv4_address }}
- name: Waiting for instance to become ACTIVE sc_cloud_computing_instance_info: token: '{{ sc_token }}' instance_id: M7e5Ba2v register: instance until: instance.status == 'ACTIVE' delay: 10 retries: 30
name: aliases: - instance_name description: - Id of the instance. - Mutually exclusive with I(instance_id) - Either I(instance_id) or I(name) is required. - Module will fail if more than one instance found. type: str 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: - Region ID to search instance by name. - Used only for I(name). type: int instance_id: description: - Id of the instance. - Mutually exclusive with I(name) - Either I(instance_id) or I(name) is required. type: str
api_url: description: URL for the failed request returned: on failure type: str created_at: description: - Date of creation of the instance. returned: on success type: str flavor_id: description: - Id of the instance's flavor. returned: on success type: str flavor_name: description: - Human-readable name of the instance's flavor. returned: on success 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. returned: on success type: bool id: description: - Id of the instance. returned: on success type: str image_id: description: - Id of the image or snapshot used for instance build/rebuild. returned: on success type: str image_name: description: - Name of the image. - May be absent if image was removed. returned: on success type: str ipv6_enabled: description: - Flag if IPv6 was enabled for instance. returned: on success type: bool name: description: - Name of the instance. returned: on success type: str openstack_uuid: description: - UUID of the instance in the Openstack API. - May be missing at some stages of lifecycle. returned: on success type: str private_ipv4_address: description: - IPv4 address for instance. - May be missing if no private network is connected to the instance. returned: on success type: str public_ipv4_address: description: - IPv4 address for instance. - May be missing if public inteface was detached via Openstack API. returned: on success 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. returned: on success type: str region_code: description: - Human-readable code for region. returned: on success type: str region_id: description: - Id of the region. - Same as in I(region_id). returned: on success 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. returned: on success type: str status_code: description: Status code for the request returned: on failure type: int updated_at: description: - Date of last update for the instance. returned: on success type: str