community / community.general / 0.1.1 / module / cs_facts Gather facts on instances of Apache CloudStack based clouds. Authors: René Moser (@resmo) stableinterface | supported by communitycommunity.general.cs_facts (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
This module fetches data from the metadata API in CloudStack. The module must be called from within the instance itself.
# 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
filter: choices: - cloudstack_service_offering - cloudstack_availability_zone - cloudstack_public_hostname - cloudstack_public_ipv4 - cloudstack_local_hostname - cloudstack_local_ipv4 - cloudstack_instance_id - cloudstack_user_data description: - Filter for a specific fact. type: str meta_data_host: description: - Host or IP of the meta data API service. - If not set, determination by parsing the dhcp lease file. type: str
cloudstack_availability_zone: description: zone the instance is deployed in. returned: success sample: ch-gva-2 type: str cloudstack_instance_id: description: UUID of the instance. returned: success sample: ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 type: str cloudstack_local_hostname: description: local hostname of the instance. returned: success sample: VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 type: str cloudstack_local_ipv4: description: local IPv4 of the instance. returned: success sample: 185.19.28.35 type: str cloudstack_public_hostname: description: public IPv4 of the router. Same as I(cloudstack_public_ipv4). returned: success sample: VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 type: str cloudstack_public_ipv4: description: public IPv4 of the router. returned: success sample: 185.19.28.35 type: str cloudstack_service_offering: description: service offering of the instance. returned: success sample: Micro 512mb 1cpu type: str cloudstack_user_data: description: data of the instance provided by users. returned: success sample: bla: foo type: dict