mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-11-25 10:23:35 +00:00
Update docs for main
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
:trim:
|
||||
|
||||
.. meta::
|
||||
:antsibull-docs: 2.23.0
|
||||
:antsibull-docs: 2.25.0
|
||||
|
||||
.. Anchors
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
.. Title
|
||||
|
||||
kubevirt_vm -- Create or delete KubeVirt VirtualMachines
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
kubevirt_vm -- Manage KubeVirt VirtualMachines
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. Collection note
|
||||
|
||||
@@ -48,7 +48,7 @@ Synopsis
|
||||
|
||||
.. Description
|
||||
|
||||
- Use the Kubernetes Python client to perform create or delete operations on KubeVirt VirtualMachines.
|
||||
- Use the Kubernetes Python client to perform create, delete, start, stop, or restart operations on KubeVirt VirtualMachines.
|
||||
- Pass options to create the VirtualMachine as module arguments.
|
||||
- Authenticate using either a config file, certificates, password or token.
|
||||
- Supports check mode.
|
||||
@@ -320,6 +320,22 @@ Parameters
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-grace_period_seconds"></div>
|
||||
<p class="ansible-option-title"><strong>grace_period_seconds</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-grace_period_seconds" title="Permalink to this option"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">integer</span>
|
||||
</p>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Specify the grace period in seconds for stopping or restarting the <code class='docutils literal notranslate'>VirtualMachine</code>.</p>
|
||||
<p>Only used when <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=stopped</span></span></a></code> or <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=restarted</span></span></a></code>.</p>
|
||||
<p>When used with <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=restarted</span></span></a></code>, the only supported values are <code class="ansible-value literal notranslate">null</code> (use the default grace period) and <code class="ansible-value literal notranslate">0</code> (force restart immediately).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-hidden_fields"></div>
|
||||
<p class="ansible-option-title"><strong>hidden_fields</strong></p>
|
||||
@@ -336,7 +352,7 @@ Parameters
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">["metadata.annotations[kubemacpool.io/transaction-timestamp]", "metadata.managedFields"]</code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>
|
||||
@@ -350,7 +366,7 @@ Parameters
|
||||
<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-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-impersonate_groups"></div>
|
||||
<p class="ansible-option-title"><strong>impersonate_groups</strong></p>
|
||||
@@ -365,7 +381,7 @@ Parameters
|
||||
<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">
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-impersonate_user"></div>
|
||||
<p class="ansible-option-title"><strong>impersonate_user</strong></p>
|
||||
@@ -379,7 +395,7 @@ Parameters
|
||||
<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">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-instancetype"></div>
|
||||
<p class="ansible-option-title"><strong>instancetype</strong></p>
|
||||
@@ -393,7 +409,7 @@ Parameters
|
||||
<p>Only used when <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>
|
||||
@@ -409,7 +425,7 @@ Parameters
|
||||
<p>The kubernetes configuration can be provided as dictionary. This feature requires a python kubernetes client version >= 17.17.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-labels"></div>
|
||||
<p class="ansible-option-title"><strong>labels</strong></p>
|
||||
@@ -422,7 +438,7 @@ Parameters
|
||||
<p>Specify labels to set on the <code class='docutils literal notranslate'>VirtualMachine</code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-name"></div>
|
||||
<p class="ansible-option-title"><strong>name</strong></p>
|
||||
@@ -437,7 +453,7 @@ Parameters
|
||||
<p>Mutually exclusive with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-generate_name"><span class="std std-ref"><span class="pre">generate_name</span></span></a></strong></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-namespace"></div>
|
||||
<p class="ansible-option-title"><strong>namespace</strong></p>
|
||||
@@ -451,7 +467,7 @@ Parameters
|
||||
<p>Specify the namespace of the <code class='docutils literal notranslate'>VirtualMachine</code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>
|
||||
@@ -468,7 +484,7 @@ Parameters
|
||||
<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-odd">
|
||||
<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>
|
||||
@@ -483,7 +499,7 @@ Parameters
|
||||
<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-even">
|
||||
<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>
|
||||
@@ -505,7 +521,7 @@ Parameters
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-preference"></div>
|
||||
<p class="ansible-option-title"><strong>preference</strong></p>
|
||||
@@ -519,7 +535,7 @@ Parameters
|
||||
<p>Only used when <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>
|
||||
@@ -534,7 +550,7 @@ Parameters
|
||||
<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-odd">
|
||||
<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>
|
||||
@@ -548,7 +564,7 @@ Parameters
|
||||
<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-even">
|
||||
<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>
|
||||
@@ -562,7 +578,7 @@ Parameters
|
||||
<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-odd">
|
||||
<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>
|
||||
@@ -576,7 +592,7 @@ Parameters
|
||||
<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-even">
|
||||
<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>
|
||||
@@ -591,7 +607,7 @@ Parameters
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-run_strategy"></div>
|
||||
<p class="ansible-option-title"><strong>run_strategy</strong></p>
|
||||
@@ -615,7 +631,7 @@ Parameters
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-running"></div>
|
||||
<p class="ansible-option-title"><strong>running</strong></p>
|
||||
@@ -636,7 +652,7 @@ Parameters
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-spec"></div>
|
||||
<p class="ansible-option-title"><strong>spec</strong></p>
|
||||
@@ -650,7 +666,7 @@ Parameters
|
||||
<p>See <a href='https://kubevirt.io/api-reference/main/definitions.html#_v1_virtualmachineinstancespec'>https://kubevirt.io/api-reference/main/definitions.html#_v1_virtualmachineinstancespec</a></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div>
|
||||
<p class="ansible-option-title"><strong>state</strong></p>
|
||||
@@ -660,19 +676,25 @@ Parameters
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Determines if an object should be created, patched, or deleted.</p>
|
||||
<p>Determines if an object should be created, patched, deleted, started, stopped, or restarted.</p>
|
||||
<p>When set to <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>, an object will be created, if it does not already exist.</p>
|
||||
<p>If set to <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code>, an existing object will be deleted.</p>
|
||||
<p>If set to <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>, an existing object will be patched, if its attributes differ from those specified.</p>
|
||||
<p>If set to <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=started</span></span></a></code>, it will be ensured that the <code class='docutils literal notranslate'>VirtualMachine</code> is running. Added in version 2.3.0.</p>
|
||||
<p>If set to <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=stopped</span></span></a></code>, it will be ensured that the <code class='docutils literal notranslate'>VirtualMachine</code> is stopped. Added in version 2.3.0.</p>
|
||||
<p>If set to <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-state"><span class="std std-ref"><span class="pre">state=restarted</span></span></a></code>, it will be ensured that the <code class='docutils literal notranslate'>VirtualMachine</code> is restarted. Added in version 2.3.0.</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">"absent"</code></p></li>
|
||||
<li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>"present"</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">"restarted"</code></p></li>
|
||||
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">"started"</code></p></li>
|
||||
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">"stopped"</code></p></li>
|
||||
</ul>
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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>
|
||||
@@ -686,7 +708,7 @@ Parameters
|
||||
<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-even">
|
||||
<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>
|
||||
@@ -708,7 +730,7 @@ Parameters
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-wait"></div>
|
||||
<p class="ansible-option-title"><strong>wait</strong></p>
|
||||
@@ -727,7 +749,7 @@ Parameters
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-wait_sleep"></div>
|
||||
<p class="ansible-option-title"><strong>wait_sleep</strong></p>
|
||||
@@ -742,7 +764,7 @@ Parameters
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">5</code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-wait_timeout"></div>
|
||||
<p class="ansible-option-title"><strong>wait_timeout</strong></p>
|
||||
@@ -866,6 +888,35 @@ Examples
|
||||
namespace: default
|
||||
state: absent
|
||||
|
||||
- name: Start a VirtualMachine
|
||||
kubevirt.core.kubevirt_vm:
|
||||
name: testvm
|
||||
namespace: default
|
||||
state: started
|
||||
wait: true
|
||||
|
||||
- name: Stop a VirtualMachine
|
||||
kubevirt.core.kubevirt_vm:
|
||||
name: testvm
|
||||
namespace: default
|
||||
state: stopped
|
||||
wait: true
|
||||
|
||||
- name: Restart a VirtualMachine
|
||||
kubevirt.core.kubevirt_vm:
|
||||
name: testvm
|
||||
namespace: default
|
||||
state: restarted
|
||||
wait: true
|
||||
|
||||
- name: Force restart a VirtualMachine
|
||||
kubevirt.core.kubevirt_vm:
|
||||
name: testvm
|
||||
namespace: default
|
||||
state: restarted
|
||||
grace_period_seconds: 0
|
||||
wait: true
|
||||
|
||||
|
||||
|
||||
.. Facts
|
||||
|
||||
Reference in New Issue
Block a user