ansible / ansible.builtin / v2.5.11 / module / cs_instance_facts Gathering facts from the API of instances from Apache CloudStack based clouds. | "added in version" 2.1 of ansible.builtin" Authors: René Moser (@resmo) stableinterface | supported by communityansible.builtin.cs_instance_facts (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
Gathering facts from the API of an instance.
- name: gather instance facts cs_instance_facts: name: web-vm-1 delegate_to: localhost
- debug: var: cloudstack_instance
name: description: - Name or display name of the instance. required: true domain: description: - Domain the instance is related to. account: description: - Account the instance is related to. api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. required: true type: str project: description: - Project the instance is related to. api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str
cloudstack_instance.account: description: Account the instance is related to. returned: success sample: example account type: string cloudstack_instance.affinity_groups: description: Affinity groups the instance is in. returned: success sample: '[ "webservers" ]' type: list cloudstack_instance.default_ip: description: Default IP address of the instance. returned: success sample: 10.23.37.42 type: string cloudstack_instance.display_name: description: Display name of the instance. returned: success sample: web-01 type: string cloudstack_instance.domain: description: Domain the instance is related to. returned: success sample: example domain type: string cloudstack_instance.group: description: Group name of the instance is related. returned: success sample: web type: string cloudstack_instance.hypervisor: description: Hypervisor related to this instance. returned: success sample: KVM type: string cloudstack_instance.id: description: UUID of the instance. returned: success sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 type: string cloudstack_instance.instance_name: description: Internal name of the instance (ROOT admin only). returned: success sample: i-44-3992-VM type: string cloudstack_instance.iso: description: Name of ISO the instance was deployed with. returned: success sample: Debian-8-64bit type: string cloudstack_instance.name: description: Name of the instance. returned: success sample: web-01 type: string cloudstack_instance.password: description: The password of the instance if exists. returned: success sample: Ge2oe7Do type: string cloudstack_instance.password_enabled: description: True if password setting is enabled. returned: success sample: true type: boolean cloudstack_instance.project: description: Name of project the instance is related to. returned: success sample: Production type: string cloudstack_instance.public_ip: description: Public IP address with instance via static NAT rule. returned: success sample: 1.2.3.4 type: string cloudstack_instance.security_groups: description: Security groups the instance is in. returned: success sample: '[ "default" ]' type: list cloudstack_instance.service_offering: description: Name of the service offering the instance has. returned: success sample: 2cpu_2gb type: string cloudstack_instance.ssh_key: description: Name of SSH key deployed to instance. returned: success sample: key@work type: string cloudstack_instance.state: description: State of the instance. returned: success sample: Running type: string cloudstack_instance.tags: description: List of resource tags associated with the instance. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: dict cloudstack_instance.template: description: Name of template the instance was deployed with. returned: success sample: Debian-8-64bit type: string cloudstack_instance.volumes: description: List of dictionaries of the volumes attached to the instance. returned: success sample: '[ { name: "ROOT-1369", type: "ROOT", size: 10737418240 }, { name: "data01, type: "DATADISK", size: 10737418240 } ]' type: list cloudstack_instance.zone: description: Name of zone the instance is in. returned: success sample: ch-gva-2 type: string created: description: Date of the instance was created. returned: success sample: 2014-12-01T14:57:57+0100 type: string