ngine_io / ngine_io.cloudstack / 2.3.0 / inventory / instance Apache CloudStack instance inventory source | "added in version" 2.1.0 of ngine_io.cloudstack" Authors: Rafael del Valle (@rvalle)ngine_io.cloudstack.instance (2.3.0) — inventory
Install with ansible-galaxy collection install ngine_io.cloudstack:==2.3.0
collections: - name: ngine_io.cloudstack version: 2.3.0
Get inventory hosts from Apache CloudStack
Allows filtering and grouping inventory hosts.
Uses an YAML configuration file ending with either I(cloudstack-instances.yml) or I(cloudstack-instances.yaml) to set parameter values (also see examples).
groups: default: {} description: Add hosts to group based on Jinja2 conditionals. type: dict plugin: choices: - ngine_io.cloudstack.instance description: Token that ensures this is a source file for the 'instance' plugin. required: true type: string strict: default: false description: - If V(yes) make invalid entries a fatal error, otherwise skip and continue. - Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. type: bool api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. env: - name: CLOUDSTACK_KEY required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. env: - name: CLOUDSTACK_ENDPOINT required: true type: str compose: default: {} description: Create vars from jinja2 expressions. type: dict hostname: choices: - v4_default_ip - hostname default: v4_default_ip description: 'Field to match the hostname. Note v4_main_ip corresponds to the primary ipv4address of the first nic adapter of the instance. ' type: string api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. env: - name: CLOUDSTACK_SECRET required: true type: str api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. env: - name: CLOUDSTACK_TIMEOUT type: int keyed_groups: default: [] description: Add hosts to group based on the values of a variable. elements: dict suboptions: default_value: description: - The default value when the host variable's value is an empty string. - This option is mutually exclusive with O(keyed_groups[].trailing_separator). type: str version_added: '2.12' version_added_collection: ansible.builtin key: description: - The key from input dictionary used to generate groups type: str parent_group: description: parent group for keyed group type: str prefix: default: '' description: A keyed group name will start with this prefix type: str separator: default: _ description: separator used to build the keyed group name type: str trailing_separator: default: true description: - Set this option to V(False) to omit the O(keyed_groups[].separator) after the host variable when the value is an empty string. - This option is mutually exclusive with O(keyed_groups[].default_value). type: bool version_added: '2.12' version_added_collection: ansible.builtin type: list filter_by_vpc: description: Only return instances in the provided VPC. type: string filter_by_zone: description: Only return instances in the provided zone. type: string use_extra_vars: default: false description: Merge extra vars into the available variables for composition (highest precedence). env: - name: ANSIBLE_INVENTORY_USE_EXTRA_VARS ini: - key: use_extra_vars section: inventory_plugins type: bool version_added: '2.11' version_added_collection: ansible.builtin api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. env: - name: CLOUDSTACK_METHOD type: str filter_by_domain: description: Only return instances in the provided domain. type: string filter_by_project: description: Only return instances in the provided project. type: string leading_separator: default: true description: - Use in conjunction with keyed_groups. - By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. - This is because the default prefix is "" and the default separator is "_". - Set this option to False to omit the leading underscore (or other separator) if no prefix is given. - If the group name is derived from a mapping the separator is still used to concatenate the items. - To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. type: boolean version_added: '2.11' version_added_collection: ansible.builtin api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. env: - name: CLOUDSTACK_VERIFY type: str