Files
kubevirt.core/2.2.2/plugins/kubevirt.html
kubevirt-bot 83a0e2d1cf Update docs for 2.2.2
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
2025-05-20 12:26:22 +00:00

1192 lines
66 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta content="2.16.3" name="antsibull-docs" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>kubevirt Inventory source for KubeVirt VirtualMachines and VirtualMachineInstances &mdash; KubeVirt Ansible Collection documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=41de9001" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="../_static/antsibull-minimal.css" />
<link rel="stylesheet" type="text/css" href="../_static/ansible-basic-sphinx-ext.css" />
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="kubevirt_vm Create or delete KubeVirt VirtualMachines" href="kubevirt_vm.html" />
<link rel="prev" title="Plugin Index" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
KubeVirt Ansible Collection
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">User documentation</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../README.html">Lean Ansible bindings for KubeVirt</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Plugin Index</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">kubevirt Inventory source for KubeVirt VirtualMachines and VirtualMachineInstances</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li class="toctree-l3"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
<li class="toctree-l3"><a class="reference internal" href="#notes">Notes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#authors">Authors</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="kubevirt_vm.html">kubevirt_vm Create or delete KubeVirt VirtualMachines</a></li>
<li class="toctree-l2"><a class="reference internal" href="kubevirt_vm_info.html">kubevirt_vm_info Describe KubeVirt VirtualMachines</a></li>
<li class="toctree-l2"><a class="reference internal" href="kubevirt_vmi_info.html">kubevirt_vmi_info Describe KubeVirt VirtualMachineInstances</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../roles/index.html">Role Index</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Developer documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../CHANGELOG.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">KubeVirt Ansible Collection</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="index.html">Plugin Index</a></li>
<li class="breadcrumb-item active">kubevirt Inventory source for KubeVirt VirtualMachines and VirtualMachineInstances</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/plugins/kubevirt.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<span class="target" id="ansible-collections-kubevirt-core-kubevirt-inventory"></span><section id="kubevirt-inventory-source-for-kubevirt-virtualmachines-and-virtualmachineinstances">
<h1>kubevirt Inventory source for KubeVirt VirtualMachines and VirtualMachineInstances<a class="headerlink" href="#kubevirt-inventory-source-for-kubevirt-virtualmachines-and-virtualmachineinstances" title="Link to this heading"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This inventory plugin is part of the <a class="reference external" href="https://galaxy.ansible.com/ui/repo/published/kubevirt/core/">kubevirt.core collection</a>.</p>
<p>It is not included in <code class="docutils literal notranslate"><span class="pre">ansible-core</span></code>.
To check whether it is installed, run <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">list</span></code>.</p>
<p>To install it, use: <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">install</span> <span class="pre">kubevirt.core</span></code>.
You need further requirements to be able to use this inventory plugin,
see <a class="reference internal" href="#ansible-collections-kubevirt-core-kubevirt-inventory-requirements"><span class="std std-ref">Requirements</span></a> for details.</p>
<p>To use it in a playbook, specify: <code class="code docutils literal notranslate"><span class="pre">kubevirt.core.kubevirt</span></code>.</p>
</div>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#synopsis" id="id1">Synopsis</a></p></li>
<li><p><a class="reference internal" href="#requirements" id="id2">Requirements</a></p></li>
<li><p><a class="reference internal" href="#parameters" id="id3">Parameters</a></p></li>
<li><p><a class="reference internal" href="#notes" id="id4">Notes</a></p></li>
<li><p><a class="reference internal" href="#examples" id="id5">Examples</a></p></li>
</ul>
</nav>
<section id="synopsis">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Fetch virtual machines from one or more namespaces with an optional label selector.</p></li>
<li><p>Groups by cluster name, namespaces and labels.</p></li>
<li><p>Uses <code class="ansible-value docutils literal notranslate"><span class="pre">*.kubevirt.[yml|yaml]</span></code> YAML configuration file to set parameter values.</p></li>
<li><p>By default it uses the active context in <em>~/.kube/config</em> and will return all virtual machines for all namespaces the active user is authorized to access.</p></li>
</ul>
</section>
<section id="requirements">
<span id="ansible-collections-kubevirt-core-kubevirt-inventory-requirements"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Requirements</a><a class="headerlink" href="#requirements" title="Link to this heading"></a></h2>
<p>The below requirements are needed on the local controller node that executes this inventory.</p>
<ul class="simple">
<li><p>python &gt;= 3.9</p></li>
<li><p>kubernetes &gt;= 28.1.0</p></li>
<li><p>PyYAML &gt;= 3.11</p></li>
</ul>
</section>
<section id="parameters">
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Parameters</a><a class="headerlink" href="#parameters" title="Link to this heading"></a></h2>
<table class="colwidths-auto ansible-option-table docutils align-default" style="width: 100%">
<thead>
<tr class="row-odd">
<th class="head"><p>Parameter</p></th>
<th class="head"><p>Comments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-api_key"></div>
<p class="ansible-option-title"><strong>api_key</strong></p>
<a class="ansibleOptionLink" href="#parameter-api_key" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Token used to authenticate with the API.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_API_KEY</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-api_version"></div>
<p class="ansible-option-title"><strong>api_version</strong></p>
<a class="ansibleOptionLink" href="#parameter-api_version" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Specify the used KubeVirt API version.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;kubevirt.io/v1&#34;</code></p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-append_base_domain"></div>
<p class="ansible-option-title"><strong>append_base_domain</strong></p>
<a class="ansibleOptionLink" href="#parameter-append_base_domain" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Append the base domain of the cluster to host names constructed from SSH <code class='docutils literal notranslate'>Services</code> of type <code class='docutils literal notranslate'>NodePort</code>.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>false</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-base_domain"></div>
<p class="ansible-option-title"><strong>base_domain</strong></p>
<a class="ansibleOptionLink" href="#parameter-base_domain" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Override the base domain used to construct host names. Used in case of <code class='docutils literal notranslate'>kubesecondarydns</code> or <code class='docutils literal notranslate'>Services</code> of type <code class='docutils literal notranslate'>NodePort</code> if <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-append_base_domain"><span class="std std-ref"><span class="pre">append_base_domain</span></span></a></strong></code> is set.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-ca_cert"></div>
<div class="ansibleOptionAnchor" id="parameter-ssl_ca_cert"></div>
<p class="ansible-option-title"><strong>ca_cert</strong></p>
<a class="ansibleOptionLink" href="#parameter-ca_cert" title="Permalink to this option"></a>
<p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: ssl_ca_cert</span></p>
<p class="ansible-option-type-line">
<span class="ansible-option-type">path</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to avoid certificate validation errors.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_SSL_CA_CERT</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-cache"></div>
<p class="ansible-option-title"><strong>cache</strong></p>
<a class="ansibleOptionLink" href="#parameter-cache" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Toggle to enable/disable the caching of the inventory&#x27;s source data, requires a cache plugin setup to work.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>false</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
<p class="ansible-option-line"><strong class="ansible-option-configuration">Configuration:</strong></p>
<ul class="simple">
<li>
<p>INI entry</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">inventory</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">cache = false</span></pre></div></div>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_INVENTORY_CACHE</code></p>
</li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-cache_connection"></div>
<p class="ansible-option-title"><strong>cache_connection</strong></p>
<a class="ansibleOptionLink" href="#parameter-cache_connection" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Cache connection data or path, read cache plugin documentation for specifics.</p>
<p class="ansible-option-line"><strong class="ansible-option-configuration">Configuration:</strong></p>
<ul class="simple">
<li>
<p>INI entries</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">defaults</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">fact_caching_connection = VALUE</span></pre></div></div>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">inventory</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">cache_connection = VALUE</span></pre></div></div>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_CACHE_PLUGIN_CONNECTION</code></p>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_INVENTORY_CACHE_CONNECTION</code></p>
</li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-cache_plugin"></div>
<p class="ansible-option-title"><strong>cache_plugin</strong></p>
<a class="ansibleOptionLink" href="#parameter-cache_plugin" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Cache plugin to use for the inventory&#x27;s source data.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;memory&#34;</code></p>
<p class="ansible-option-line"><strong class="ansible-option-configuration">Configuration:</strong></p>
<ul class="simple">
<li>
<p>INI entries</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">defaults</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">fact_caching = memory</span></pre></div></div>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">inventory</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">cache_plugin = memory</span></pre></div></div>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_CACHE_PLUGIN</code></p>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_INVENTORY_CACHE_PLUGIN</code></p>
</li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-cache_prefix"></div>
<p class="ansible-option-title"><strong>cache_prefix</strong></p>
<a class="ansibleOptionLink" href="#parameter-cache_prefix" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Prefix to use for cache plugin files/tables.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;ansible_inventory_&#34;</code></p>
<p class="ansible-option-line"><strong class="ansible-option-configuration">Configuration:</strong></p>
<ul class="simple">
<li>
<p>INI entries</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">defaults</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">fact_caching_prefix = ansible_inventory_</span></pre></div></div>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">inventory</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">cache_prefix = ansible_inventory_</span></pre></div></div>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_CACHE_PLUGIN_PREFIX</code></p>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX</code></p>
</li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-cache_timeout"></div>
<p class="ansible-option-title"><strong>cache_timeout</strong></p>
<a class="ansibleOptionLink" href="#parameter-cache_timeout" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">integer</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Cache duration in seconds.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">3600</code></p>
<p class="ansible-option-line"><strong class="ansible-option-configuration">Configuration:</strong></p>
<ul class="simple">
<li>
<p>INI entries</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">defaults</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">fact_caching_timeout = 3600</span></pre></div></div>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">inventory</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">cache_timeout = 3600</span></pre></div></div>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_CACHE_PLUGIN_TIMEOUT</code></p>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_INVENTORY_CACHE_TIMEOUT</code></p>
</li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-client_cert"></div>
<div class="ansibleOptionAnchor" id="parameter-cert_file"></div>
<p class="ansible-option-title"><strong>client_cert</strong></p>
<a class="ansibleOptionLink" href="#parameter-client_cert" title="Permalink to this option"></a>
<p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: cert_file</span></p>
<p class="ansible-option-type-line">
<span class="ansible-option-type">path</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Path to a certificate used to authenticate with the API.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_CERT_FILE</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-client_key"></div>
<div class="ansibleOptionAnchor" id="parameter-key_file"></div>
<p class="ansible-option-title"><strong>client_key</strong></p>
<a class="ansibleOptionLink" href="#parameter-client_key" title="Permalink to this option"></a>
<p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: key_file</span></p>
<p class="ansible-option-type-line">
<span class="ansible-option-type">path</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Path to a key file used to authenticate with the API.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_KEY_FILE</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-compose"></div>
<p class="ansible-option-title"><strong>compose</strong></p>
<a class="ansibleOptionLink" href="#parameter-compose" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">dictionary</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Create vars from jinja2 expressions.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">{}</code></p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-connections"></div>
<p class="ansible-option-title"><strong>connections</strong></p>
<a class="ansibleOptionLink" href="#parameter-connections" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Optional list of cluster connection settings.</p>
<p>This parameter is deprecated. Split your connections into multiple configuration files and move parameters of each connection to the configuration top level.</p>
<p>Deprecated in version <code class='docutils literal notranslate'>1.5.0</code>, will be removed in version <code class='docutils literal notranslate'>3.0.0</code>.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-context"></div>
<p class="ansible-option-title"><strong>context</strong></p>
<a class="ansibleOptionLink" href="#parameter-context" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>The name of a context found in the config file.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_CONTEXT</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-create_groups"></div>
<p class="ansible-option-title"><strong>create_groups</strong></p>
<a class="ansibleOptionLink" href="#parameter-create_groups" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Enable the creation of groups from labels on <code class='docutils literal notranslate'>VirtualMachines</code> and <code class='docutils literal notranslate'>VirtualMachineInstances</code>.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>false</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-groups"></div>
<p class="ansible-option-title"><strong>groups</strong></p>
<a class="ansibleOptionLink" href="#parameter-groups" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">dictionary</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Add hosts to group based on Jinja2 conditionals.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">{}</code></p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-host"></div>
<p class="ansible-option-title"><strong>host</strong></p>
<a class="ansibleOptionLink" href="#parameter-host" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Provide a URL for accessing the API.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_HOST</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-host_format"></div>
<p class="ansible-option-title"><strong>host_format</strong></p>
<a class="ansibleOptionLink" href="#parameter-host_format" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Specify the format of the host in the inventory group. Available specifiers: <code class="ansible-value literal notranslate">name</code>, <code class="ansible-value literal notranslate">namespace</code> and <code class="ansible-value literal notranslate">uid</code>.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;{namespace}-{name}&#34;</code></p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-impersonate_groups"></div>
<p class="ansible-option-title"><strong>impersonate_groups</strong></p>
<a class="ansibleOptionLink" href="#parameter-impersonate_groups" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">list</span>
/ <span class="ansible-option-elements">elements=string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Group(s) to impersonate for the operation.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_IMPERSONATE_GROUPS</code> environment variable, e.g. <code class='docutils literal notranslate'>Group1,Group2</code>.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-impersonate_user"></div>
<p class="ansible-option-title"><strong>impersonate_user</strong></p>
<a class="ansibleOptionLink" href="#parameter-impersonate_user" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Username to impersonate for the operation.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_IMPERSONATE_USER</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups"></div>
<p class="ansible-option-title"><strong>keyed_groups</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">list</span>
/ <span class="ansible-option-elements">elements=dictionary</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Add hosts to group based on the values of a variable.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">[]</code></p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/default_value"></div>
<p class="ansible-option-title"><strong>default_value</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups/default_value" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
<p><em class="ansible-option-versionadded">added in ansible-core 2.12</em></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>The default value when the host variable&#x27;s value is an empty string.</p>
<p>This option is mutually exclusive with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-keyed_groups/trailing_separator"><span class="std std-ref"><span class="pre">keyed_groups[].trailing_separator</span></span></a></strong></code>.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/key"></div>
<p class="ansible-option-title"><strong>key</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups/key" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>The key from input dictionary used to generate groups.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/parent_group"></div>
<p class="ansible-option-title"><strong>parent_group</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups/parent_group" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>parent group for keyed group.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/prefix"></div>
<p class="ansible-option-title"><strong>prefix</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups/prefix" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>A keyed group name will start with this prefix.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;&#34;</code></p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/separator"></div>
<p class="ansible-option-title"><strong>separator</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups/separator" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>separator used to build the keyed group name.</p>
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;_&#34;</code></p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-keyed_groups/trailing_separator"></div>
<p class="ansible-option-title"><strong>trailing_separator</strong></p>
<a class="ansibleOptionLink" href="#parameter-keyed_groups/trailing_separator" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
<p><em class="ansible-option-versionadded">added in ansible-core 2.12</em></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>Set this option to <code class="ansible-value literal notranslate">false</code> to omit the <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-keyed_groups/separator"><span class="std std-ref"><span class="pre">keyed_groups[].separator</span></span></a></strong></code> after the host variable when the value is an empty string.</p>
<p>This option is mutually exclusive with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-keyed_groups/default_value"><span class="std std-ref"><span class="pre">keyed_groups[].default_value</span></span></a></strong></code>.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>true</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-kube_secondary_dns"></div>
<p class="ansible-option-title"><strong>kube_secondary_dns</strong></p>
<a class="ansibleOptionLink" href="#parameter-kube_secondary_dns" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Enable <code class='docutils literal notranslate'>kubesecondarydns</code> derived host names when using a secondary network interface.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>false</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-kubeconfig"></div>
<p class="ansible-option-title"><strong>kubeconfig</strong></p>
<a class="ansibleOptionLink" href="#parameter-kubeconfig" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">any</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Path to an existing Kubernetes config file. If not provided, and no other connection options are provided, the Kubernetes client will attempt to load the default configuration file from <em>~/.kube/config</em>.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_KUBECONFIG</code> environment variable.</p>
<p>Multiple Kubernetes config file can be provided using separator <code class='docutils literal notranslate'>;</code> for Windows platform or <code class='docutils literal notranslate'>:</code> for others platforms.</p>
<p>The kubernetes configuration can be provided as dictionary. This feature requires a python kubernetes client version &gt;= 17.17.0.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-label_selector"></div>
<p class="ansible-option-title"><strong>label_selector</strong></p>
<a class="ansibleOptionLink" href="#parameter-label_selector" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Define a label selector to select a subset of the fetched virtual machines.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-leading_separator"></div>
<p class="ansible-option-title"><strong>leading_separator</strong></p>
<a class="ansibleOptionLink" href="#parameter-leading_separator" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
<p><em class="ansible-option-versionadded">added in ansible-core 2.11</em></p>
</div></td>
<td><div class="ansible-option-cell">
<p>Use in conjunction with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-keyed_groups"><span class="std std-ref"><span class="pre">keyed_groups</span></span></a></strong></code>.</p>
<p>By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.</p>
<p>This is because the default prefix is <code class="ansible-value literal notranslate">""</code> and the default separator is <code class="ansible-value literal notranslate">"_"</code>.</p>
<p>Set this option to <code class="ansible-value literal notranslate">false</code> to omit the leading underscore (or other separator) if no prefix is given.</p>
<p>If the group name is derived from a mapping the separator is still used to concatenate the items.</p>
<p>To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>true</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-name"></div>
<p class="ansible-option-title"><strong>name</strong></p>
<a class="ansibleOptionLink" href="#parameter-name" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Optional name to assign to the cluster. If not provided, a name is constructed from the server and port.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-namespaces"></div>
<p class="ansible-option-title"><strong>namespaces</strong></p>
<a class="ansibleOptionLink" href="#parameter-namespaces" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>List of namespaces. If not specified, will fetch virtual machines from all namespaces the user is authorized to access.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-network_name"></div>
<div class="ansibleOptionAnchor" id="parameter-interface_name"></div>
<p class="ansible-option-title"><strong>network_name</strong></p>
<a class="ansibleOptionLink" href="#parameter-network_name" title="Permalink to this option"></a>
<p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: interface_name</span></p>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>In case multiple networks are attached to a virtual machine, define which interface should be returned as primary IP address.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-no_proxy"></div>
<p class="ansible-option-title"><strong>no_proxy</strong></p>
<a class="ansibleOptionLink" href="#parameter-no_proxy" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>The comma separated list of hosts/domains/IP/CIDR that shouldn&#x27;t go through proxy.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_NO_PROXY</code> environment variable.</p>
<p>Please note that this module does not pick up typical proxy settings from the environment (e.g. <code class="xref std std-envvar literal notranslate">NO_PROXY</code>).</p>
<p>This feature requires <code class='docutils literal notranslate'>kubernetes&gt;=19.15.0</code>. When kubernetes library is less than 19.15.0, it fails even no_proxy set in correct.</p>
<p>Example value is <code class='docutils literal notranslate'>localhost,.local,.example.com,127.0.0.1,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16</code>.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-password"></div>
<p class="ansible-option-title"><strong>password</strong></p>
<a class="ansibleOptionLink" href="#parameter-password" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Provide a password for authenticating with the API.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_PASSWORD</code> environment variable.</p>
<p>Please read the description of the <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-username"><span class="std std-ref"><span class="pre">username</span></span></a></strong></code> option for a discussion of when this option is applicable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-persist_config"></div>
<p class="ansible-option-title"><strong>persist_config</strong></p>
<a class="ansibleOptionLink" href="#parameter-persist_config" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Whether or not to save the kube config refresh tokens.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_PERSIST_CONFIG</code> environment variable.</p>
<p>When the k8s context is using a user credentials with refresh tokens (like oidc or gke/gcloud auth), the token is refreshed by the k8s python client library but not saved by default. So the old refresh token can expire and the next auth might fail. Setting this flag to true will tell the k8s python client to save the new refresh token to the kube config file.</p>
<p>Disabled by default.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-plugin"></div>
<p class="ansible-option-title"><strong>plugin</strong></p>
<a class="ansibleOptionLink" href="#parameter-plugin" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
/ <span class="ansible-option-required">required</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Token that ensures this is a source file for the <a href='../../kubevirt/core/kubevirt_inventory.html' class='module'>kubevirt.core.kubevirt</a> plugin.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">&#34;kubevirt&#34;</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">&#34;kubevirt.core.kubevirt&#34;</code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-proxy"></div>
<p class="ansible-option-title"><strong>proxy</strong></p>
<a class="ansibleOptionLink" href="#parameter-proxy" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>The URL of an HTTP proxy to use for the connection.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_PROXY</code> environment variable.</p>
<p>Please note that this module does not pick up typical proxy settings from the environment (e.g. <code class="xref std std-envvar literal notranslate">HTTP_PROXY</code>).</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-proxy_headers"></div>
<p class="ansible-option-title"><strong>proxy_headers</strong></p>
<a class="ansibleOptionLink" href="#parameter-proxy_headers" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">dictionary</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>The Header used for the HTTP proxy.</p>
<p>Documentation can be found here <a href='https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html?highlight=proxy_headers#urllib3.util.make_headers'>https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html?highlight=proxy_headers#urllib3.util.make_headers</a>.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-proxy_headers/basic_auth"></div>
<p class="ansible-option-title"><strong>basic_auth</strong></p>
<a class="ansibleOptionLink" href="#parameter-proxy_headers/basic_auth" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>Colon-separated username:password for basic authentication header.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_PROXY_HEADERS_BASIC_AUTH</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-proxy_headers/proxy_basic_auth"></div>
<p class="ansible-option-title"><strong>proxy_basic_auth</strong></p>
<a class="ansibleOptionLink" href="#parameter-proxy_headers/proxy_basic_auth" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>Colon-separated username:password for proxy basic authentication header.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_PROXY_HEADERS_PROXY_BASIC_AUTH</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-proxy_headers/user_agent"></div>
<p class="ansible-option-title"><strong>user_agent</strong></p>
<a class="ansibleOptionLink" href="#parameter-proxy_headers/user_agent" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
<p>String representing the user-agent you want, such as foo/1.0.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_PROXY_HEADERS_USER_AGENT</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-strict"></div>
<p class="ansible-option-title"><strong>strict</strong></p>
<a class="ansibleOptionLink" href="#parameter-strict" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>If <code class="ansible-value literal notranslate">yes</code> make invalid entries a fatal error, otherwise skip and continue.</p>
<p>Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>false</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-unset_ansible_port"></div>
<p class="ansible-option-title"><strong>unset_ansible_port</strong></p>
<a class="ansibleOptionLink" href="#parameter-unset_ansible_port" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.2.0</em></p>
</div></td>
<td><div class="ansible-option-cell">
<p>Try to unset the value of <code class='docutils literal notranslate'>ansible_port</code> if no non-default value was found.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>true</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-use_extra_vars"></div>
<p class="ansible-option-title"><strong>use_extra_vars</strong></p>
<a class="ansibleOptionLink" href="#parameter-use_extra_vars" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
<p><em class="ansible-option-versionadded">added in ansible-core 2.11</em></p>
</div></td>
<td><div class="ansible-option-cell">
<p>Merge extra vars into the available variables for composition (highest precedence).</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>false</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
<p class="ansible-option-line"><strong class="ansible-option-configuration">Configuration:</strong></p>
<ul class="simple">
<li>
<p>INI entry</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span class="p p-Indicator">[</span><span class="nv">inventory_plugins</span><span class="p p-Indicator">]</span>
<span class="l l-Scalar l-Scalar-Plain">use_extra_vars = false</span></pre></div></div>
</li>
<li>
<p>Environment variable: <code class="xref std std-envvar literal notranslate">ANSIBLE_INVENTORY_USE_EXTRA_VARS</code></p>
</li>
</ul>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-use_service"></div>
<p class="ansible-option-title"><strong>use_service</strong></p>
<a class="ansibleOptionLink" href="#parameter-use_service" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Enable the use of <code class='docutils literal notranslate'>Services</code> to establish an SSH connection to a virtual machine.</p>
<p>Services are only used if no <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-network_name"><span class="std std-ref"><span class="pre">network_name</span></span></a></strong></code> was provided.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>true</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
</ul>
</div></td>
</tr>
<tr class="row-even">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-username"></div>
<p class="ansible-option-title"><strong>username</strong></p>
<a class="ansibleOptionLink" href="#parameter-username" title="Permalink to this option"></a>
<p class="ansible-option-type-line">
<span class="ansible-option-type">string</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Provide a username for authenticating with the API.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_USERNAME</code> environment variable.</p>
</div></td>
</tr>
<tr class="row-odd">
<td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-validate_certs"></div>
<div class="ansibleOptionAnchor" id="parameter-verify_ssl"></div>
<p class="ansible-option-title"><strong>validate_certs</strong></p>
<a class="ansibleOptionLink" href="#parameter-validate_certs" title="Permalink to this option"></a>
<p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: verify_ssl</span></p>
<p class="ansible-option-type-line">
<span class="ansible-option-type">boolean</span>
</p>
</div></td>
<td><div class="ansible-option-cell">
<p>Whether or not to verify the API server&#x27;s SSL certificates.</p>
<p>Can also be specified via <code class="xref std std-envvar literal notranslate">K8S_AUTH_VERIFY_SSL</code> environment variable.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
</ul>
</div></td>
</tr>
</tbody>
</table></section>
<section id="notes">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Notes</a><a class="headerlink" href="#notes" title="Link to this heading"></a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>To avoid SSL certificate validation errors when <code class="ansible-option-value docutils literal notranslate"><a class="reference external" href="https://docs.ansible.com/ansible/latest/collections/kubevirt/core/kubevirt_inventory.html#ansible-collections-kubevirt-core-kubevirt-inventory-parameter-validate-certs" title="(in Ansible v11)"><span><span class="pre">validate_certs=yes</span></span></a></code>, the full certificate chain for the API server must be provided via <code class="ansible-option docutils literal notranslate"><strong><a class="reference external" href="https://docs.ansible.com/ansible/latest/collections/kubevirt/core/kubevirt_inventory.html#ansible-collections-kubevirt-core-kubevirt-inventory-parameter-ca-cert" title="(in Ansible v11)"><span><span class="pre">ca_cert</span></span></a></strong></code> or in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference external" href="https://docs.ansible.com/ansible/latest/collections/kubevirt/core/kubevirt_inventory.html#ansible-collections-kubevirt-core-kubevirt-inventory-parameter-kubeconfig" title="(in Ansible v11)"><span><span class="pre">kubeconfig</span></span></a></strong></code> file.</p></li>
</ul>
</div>
</section>
<section id="examples">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="c1"># Filename must end with kubevirt.[yml|yaml]</span>
<span class="c1"># Authenticate with token and return all virtual machines from all accessible namespaces</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">kubevirt.core.kubevirt</span>
<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://192.168.64.4:8443</span>
<span class="w"> </span><span class="nt">api_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">xxxxxxxxxxxxxxxx</span>
<span class="w"> </span><span class="nt">validate_certs</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="c1"># Use default ~/.kube/config and return virtual machines from namespace testing connected to network bridge-network</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">kubevirt.core.kubevirt</span>
<span class="w"> </span><span class="nt">namespaces</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">testing</span>
<span class="w"> </span><span class="nt">network_name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bridge-network</span>
<span class="c1"># Use default ~/.kube/config and return virtual machines from namespace testing with label app=test</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">kubevirt.core.kubevirt</span>
<span class="w"> </span><span class="nt">namespaces</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">testing</span>
<span class="w"> </span><span class="nt">label_selector</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">app=test</span>
<span class="c1"># Use a custom config file and a specific context</span>
<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">kubevirt.core.kubevirt</span>
<span class="w"> </span><span class="nt">kubeconfig</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/path/to/config</span>
<span class="w"> </span><span class="nt">context</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;awx/192-168-64-4:8443/developer&#39;</span>
</pre></div>
</div>
<section id="authors">
<h3>Authors<a class="headerlink" href="#authors" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>KubeVirt.io Project</p></li>
</ul>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.</p>
</div>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Plugin Index" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="kubevirt_vm.html" class="btn btn-neutral float-right" title="kubevirt_vm Create or delete KubeVirt VirtualMachines" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2025 Red Hat, Inc..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>