cs_facts - Gather facts on instances of Apache CloudStack based clouds.¶
New in version 2.0.
Synopsis¶
- This module fetches data from the metadata API in CloudStack. The module must be called from within the instance itself.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
filter |
|
Filter for a specific fact.
|
meta_data_host
(added in 2.4) |
Host or IP of the meta data API service.
If not set, determination by parsing the dhcp lease file.
|
Examples¶
# Gather all facts on instances
- name: Gather cloudstack facts
cs_facts:
# Gather specific fact on instances
- name: Gather cloudstack facts
cs_facts: filter=cloudstack_instance_id
# Gather specific fact on instances with a given meta_data_host
- name: Gather cloudstack facts
cs_facts:
filter: cloudstack_instance_id
meta_data_host: 169.254.169.254
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
cloudstack_availability_zone
string
|
success |
zone the instance is deployed in.
Sample:
ch-gva-2
|
cloudstack_instance_id
string
|
success |
UUID of the instance.
Sample:
ab4e80b0-3e7e-4936-bdc5-e334ba5b0139
|
cloudstack_local_hostname
string
|
success |
local hostname of the instance.
Sample:
VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139
|
cloudstack_local_ipv4
string
|
success |
local IPv4 of the instance.
Sample:
185.19.28.35
|
cloudstack_public_hostname
string
|
success |
public IPv4 of the router. Same as
cloudstack_public_ipv4 .Sample:
VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139
|
cloudstack_public_ipv4
string
|
success |
public IPv4 of the router.
Sample:
185.19.28.35
|
cloudstack_service_offering
string
|
success |
service offering of the instance.
Sample:
Micro 512mb 1cpu
|
cloudstack_user_data
dict
|
success |
data of the instance provided by users.
Sample:
{'bla': 'foo'}
|
Status¶
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- René Moser (@resmo)
Hint
If you notice any issues in this documentation you can edit this document to improve it.