community / community.general / 1.3.14 / inventory / kubevirt KubeVirt inventory source Authors: KubeVirt Team (@kubevirt)community.general.kubevirt (1.3.14) — inventory
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
Fetch running VirtualMachines for one or more namespaces.
Groups by namespace, namespace_vms and labels.
Uses kubevirt.(yml|yaml) YAML configuration file to set parameter values.
cache: default: false description: - Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. env: - name: ANSIBLE_INVENTORY_CACHE ini: - key: cache section: inventory type: bool groups: default: {} description: Add hosts to group based on Jinja2 conditionals. type: dict plugin: choices: - kubevirt - community.general.kubevirt description: token that ensures this is a source file for the 'kubevirt' plugin. required: true type: str 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 compose: default: {} description: Create vars from jinja2 expressions. type: dict connections: description: - Optional list of cluster connection settings. If no connections are provided, the default I(~/.kube/config) and active context will be used, and objects will be returned for all namespaces the active user is authorized to access. suboptions: annotation_variable: default: ansible description: - Specify the name of the annotation which provides data, which should be used as inventory host variables. - Note, that the value in ansible annotations should be json. type: str api_key: description: - Token used to authenticate with the API. Can also be specified via K8S_AUTH_API_KEY environment variable. type: str api_version: description: - Specify the KubeVirt API version. type: str cert_file: description: - Path to a certificate used to authenticate with the API. Can also be specified via K8S_AUTH_CERT_FILE environment variable. type: str context: description: - The name of a context found in the config file. Can also be specified via K8S_AUTH_CONTEXT environment variable. type: str host: description: - Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable. type: str key_file: description: - Path to a key file used to authenticate with the API. Can also be specified via K8S_AUTH_HOST environment variable. type: str kubeconfig: description: - Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the OpenShift client will attempt to load the default configuration file from I(~/.kube/config.json). Can also be specified via K8S_AUTH_KUBECONFIG environment variable. type: str name: description: - Optional name to assign to the cluster. If not provided, a name is constructed from the server and port. type: str namespaces: description: - List of namespaces. If not specified, will fetch all virtual machines for all namespaces user is authorized to access. type: list network_name: aliases: - interface_name description: - In case of multiple network attached to virtual machine, define which interface should be returned as primary IP address. type: str password: description: - Provide a password for authenticating with the API. Can also be specified via K8S_AUTH_PASSWORD environment variable. type: str ssl_ca_cert: description: - Path to a CA certificate used to authenticate with the API. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable. type: str username: description: - Provide a username for authenticating with the API. Can also be specified via K8S_AUTH_USERNAME environment variable. type: str verify_ssl: description: - Whether or not to verify the API server's SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL environment variable. type: bool type: list host_format: default: '{namespace}-{name}-{uid}' description: - Specify the format of the host in the inventory group. cache_plugin: default: memory description: - Cache plugin to use for the inventory's source data. env: - name: ANSIBLE_CACHE_PLUGIN - name: ANSIBLE_INVENTORY_CACHE_PLUGIN ini: - key: fact_caching section: defaults - key: cache_plugin section: inventory type: str cache_prefix: default: ansible_inventory_ description: - Prefix to use for cache plugin files/tables env: - name: ANSIBLE_CACHE_PLUGIN_PREFIX - name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX ini: - key: fact_caching_prefix section: defaults - key: cache_prefix section: inventory 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 cache_timeout: default: 3600 description: - Cache duration in seconds env: - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT - name: ANSIBLE_INVENTORY_CACHE_TIMEOUT ini: - key: fact_caching_timeout section: defaults - key: cache_timeout section: inventory type: int 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 cache_connection: description: - Cache connection data or path, read cache plugin documentation for specifics. env: - name: ANSIBLE_CACHE_PLUGIN_CONNECTION - name: ANSIBLE_INVENTORY_CACHE_CONNECTION ini: - key: fact_caching_connection section: defaults - key: cache_connection section: inventory type: str 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