ansible / ansible.builtin / v2.4.6.0-1 / module / cs_facts Gather facts on instances of Apache CloudStack based clouds. | "added in version" 2.0 of ansible.builtin" Authors: René Moser (@resmo) stableinterface | supported by communityansible.builtin.cs_facts (v2.4.6.0-1) — module
pip
Install with pip install ansible==2.4.6.0.post1
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. meta_data_host: description: - Host or IP of the meta data API service. - If not set, determination by parsing the dhcp lease file. version_added: '2.4' version_added_collection: ansible.builtin
cloudstack_availability_zone: description: zone the instance is deployed in. returned: success sample: ch-gva-2 type: string cloudstack_instance_id: description: UUID of the instance. returned: success sample: ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 type: string cloudstack_local_hostname: description: local hostname of the instance. returned: success sample: VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 type: string cloudstack_local_ipv4: description: local IPv4 of the instance. returned: success sample: 185.19.28.35 type: string cloudstack_public_hostname: description: public IPv4 of the router. Same as C(cloudstack_public_ipv4). returned: success sample: VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 type: string cloudstack_public_ipv4: description: public IPv4 of the router. returned: success sample: 185.19.28.35 type: string cloudstack_service_offering: description: service offering of the instance. returned: success sample: Micro 512mb 1cpu type: string cloudstack_user_data: description: data of the instance provided by users. returned: success sample: bla: foo type: dict