New in version 2.1.
parameter | required | default | choices | comments |
---|---|---|---|---|
account | no | Account the instance is related to. | ||
api_http_method | no | get |
| HTTP method used. |
api_key | no | API key of the CloudStack API. | ||
api_region | no | cloudstack | Name of the ini section in the cloustack.ini file. | |
api_secret | no | Secret key of the CloudStack API. | ||
api_timeout | no | 10 | HTTP timeout. | |
api_url | no | URL of the CloudStack API e.g. https://cloud.example.com/client/api. | ||
domain | no | Domain the instance is related to. | ||
name | yes | Name or display name of the instance. | ||
project | no | Project the instance is related to. |
- cs_instance_facts: name: web-vm-1 delegate_to: localhost - debug: var: cloudstack_instance
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
cloudstack_instance.ssh_key | Name of SSH key deployed to instance. | success | string | key@work |
cloudstack_instance.name | Name of the instance. | success | string | web-01 |
cloudstack_instance.password | The password of the instance if exists. | success | string | Ge2oe7Do |
cloudstack_instance.default_ip | Default IP address of the instance. | success | string | 10.23.37.42 |
cloudstack_instance.volumes | List of dictionaries of the volumes attached to the instance. | success | list | [ { name: "ROOT-1369", type: "ROOT", size: 10737418240 }, { name: "data01, type: "DATADISK", size: 10737418240 } ] |
cloudstack_instance.tags | List of resource tags associated with the instance. | success | dict | [ { "key": "foo", "value": "bar" } ] |
cloudstack_instance.zone | Name of zone the instance is in. | success | string | ch-gva-2 |
cloudstack_instance.state | State of the instance. | success | string | Running |
cloudstack_instance.public_ip | Public IP address with instance via static NAT rule. | success | string | 1.2.3.4 |
cloudstack_instance.display_name | Display name of the instance. | success | string | web-01 |
cloudstack_instance.affinity_groups | Affinity groups the instance is in. | success | list | [ "webservers" ] |
cloudstack_instance.id | UUID of the instance. | success | string | 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
cloudstack_instance.project | Name of project the instance is related to. | success | string | Production |
cloudstack_instance.instance_name | Internal name of the instance (ROOT admin only). | success | string | i-44-3992-VM |
created | Date of the instance was created. | success | string | 2014-12-01T14:57:57+0100 |
cloudstack_instance.password_enabled | True if password setting is enabled. | success | boolean | True |
cloudstack_instance.iso | Name of ISO the instance was deployed with. | success | string | Debian-8-64bit |
cloudstack_instance.service_offering | Name of the service offering the instance has. | success | string | 2cpu_2gb |
cloudstack_instance.account | Account the instance is related to. | success | string | example account |
cloudstack_instance.hypervisor | Hypervisor related to this instance. | success | string | KVM |
cloudstack_instance.security_groups | Security groups the instance is in. | success | list | [ "default" ] |
cloudstack_instance.group | Group name of the instance is related. | success | string | web |
cloudstack_instance.domain | Domain the instance is related to. | success | string | example domain |
cloudstack_instance.template | Name of template the instance was deployed with. | success | string | Debian-8-64bit |
Note
cs
library’s configuration method if credentials are not provided by the arguments api_url
, api_key
, api_secret
. Configuration is read from several locations, in the following order. - The CLOUDSTACK_ENDPOINT
, CLOUDSTACK_KEY
, CLOUDSTACK_SECRET
and CLOUDSTACK_METHOD
. CLOUDSTACK_TIMEOUT
environment variables. - A CLOUDSTACK_CONFIG
environment variable pointing to an .ini
file, - A cloudstack.ini
file in the current working directory. - A .cloudstack.ini
file in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections in cloudstack.ini
. Use the argument api_region
to select the section name, default section is cloudstack
. See https://github.com/exoscale/cs for more information.This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/cs_instance_facts_module.html