ngine_io.cloudstack.cs_facts – Gather facts on instances of Apache CloudStack based clouds.
Note
This plugin is part of the ngine_io.cloudstack collection (version 2.2.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install ngine_io.cloudstack
.
To use it in a playbook, specify: ngine_io.cloudstack.cs_facts
.
New in version 0.1.0: of ngine_io.cloudstack
Synopsis
This module fetches data from the metadata API in CloudStack. The module must be called from within the instance itself.
Parameters
Parameter |
Comments |
---|---|
Filter for a specific fact. Choices:
|
|
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
ngine_io.cloudstack.cs_facts:
# Gather specific fact on instances
- name: Gather cloudstack facts
ngine_io.cloudstack.cs_facts: filter=cloudstack_instance_id
# Gather specific fact on instances with a given meta_data_host
- name: Gather cloudstack facts
ngine_io.cloudstack.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 |
Description |
---|---|
zone the instance is deployed in. Returned: success Sample: “ch-gva-2” |
|
UUID of the instance. Returned: success Sample: “ab4e80b0-3e7e-4936-bdc5-e334ba5b0139” |
|
local hostname of the instance. Returned: success Sample: “VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139” |
|
local IPv4 of the instance. Returned: success Sample: “185.19.28.35” |
|
public IPv4 of the router. Same as cloudstack_public_ipv4. Returned: success Sample: “VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139” |
|
public IPv4 of the router. Returned: success Sample: “185.19.28.35” |
|
service offering of the instance. Returned: success Sample: “Micro 512mb 1cpu” |
|
data of the instance provided by users. Returned: success Sample: {“bla”: “foo”} |
Authors
René Moser (@resmo)