Documentation

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.

Requirements (on host that executes module)

  • yaml

Options

parameter required default choices comments
filter
no
  • cloudstack_service_offering
  • cloudstack_availability_zone
  • cloudstack_public_hostname
  • cloudstack_public_ipv4
  • cloudstack_local_hostname
  • cloudstack_local_ipv4
  • cloudstack_instance_id
  • cloudstack_user_data
Filter for a specific fact.

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

Return Values

Common return values are documented here Common Return Values, the following are the fields unique to this module:

name description returned type sample
cloudstack_instance_id UUID of the instance. success string ab4e80b0-3e7e-4936-bdc5-e334ba5b0139
cloudstack_public_ipv4 public IPv4 of the router. success string 185.19.28.35
cloudstack_local_ipv4 local IPv4 of the instance. success string 185.19.28.35
cloudstack_availability_zone zone the instance is deployed in. success string ch-gva-2
cloudstack_local_hostname local hostname of the instance. success string VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139
cloudstack_service_offering service offering of the instance. success string Micro 512mb 1cpu
cloudstack_public_hostname public IPv4 of the router. Same as C(cloudstack_public_ipv4). success string VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139
cloudstack_user_data data of the instance provided by users. success dict {'bla': 'foo'}


This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.