mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-05-08 14:22:38 +00:00
Update docs for 1.3.2
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
This commit is contained in:
89
1.3.2/_sources/CHANGELOG.rst.txt
Normal file
89
1.3.2/_sources/CHANGELOG.rst.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
=============================================
|
||||
KubeVirt Collection for Ansible Release Notes
|
||||
=============================================
|
||||
|
||||
.. contents:: Topics
|
||||
|
||||
This changelog describes changes after version 1.0.0.
|
||||
|
||||
v1.3.2
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
No functional changes, hotfix release to retrigger the downstream build and to keep in sync with Ansible Automation Hub.
|
||||
|
||||
v1.3.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
No functional changes, only updates to the shipped documentation.
|
||||
|
||||
v1.3.0
|
||||
======
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- feat: Add append_base_domain option to connections `#72 <https://github.com/kubevirt/kubevirt.core/pull/72>`_
|
||||
- feat: Give secondary interfaces a higher priority over services `#76 <https://github.com/kubevirt/kubevirt.core/pull/76>`_
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- feat: Set ansible_connection to winrm for Windows hosts `#75 <https://github.com/kubevirt/kubevirt.core/pull/75>`_
|
||||
- fix: Explicity set ansible_port `#70 <https://github.com/kubevirt/kubevirt.core/pull/70>`_
|
||||
- fix: Return early to avoid adding empty groups. `#73 <https://github.com/kubevirt/kubevirt.core/pull/73>`_
|
||||
|
||||
v1.2.3
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
No functional changes, hotfix release to retrigger the downstream build and to keep in sync with Ansible Automation Hub.
|
||||
|
||||
v1.2.2
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
No functional changes, only cleanup of files included in the release tarball and vendoring of documentation fragments.
|
||||
|
||||
v1.2.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Mostly code cleanups and dependency updates to ensure compatibility with KubeVirt >= 1.1.0
|
||||
|
||||
v1.2.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Not released due to issues in the release process
|
||||
|
||||
v1.1.0
|
||||
======
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add kubevirt_vm_info module to describe existing VirtualMachines
|
||||
- inventory: Allow to control creation of additional groups
|
||||
- inventory: Drop creation of the namespace_vmis_group as it is redundant
|
||||
|
||||
v1.0.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Initial release
|
||||
3
1.3.2/_sources/CONTRIBUTING.md.txt
Normal file
3
1.3.2/_sources/CONTRIBUTING.md.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# Contributing
|
||||
|
||||
Refer to the [KubeVirt Contributing guidelines](https://github.com/kubevirt/kubevirt/blob/main/CONTRIBUTING.md).
|
||||
117
1.3.2/_sources/README.md.txt
Normal file
117
1.3.2/_sources/README.md.txt
Normal file
@@ -0,0 +1,117 @@
|
||||
# Lean Ansible bindings for KubeVirt
|
||||
<!--start build_status -->
|
||||
[](https://github.com/kubevirt/kubevirt.core/actions)
|
||||
<!--end build_status -->
|
||||
|
||||
This repository hosts the `kubevirt.core` Ansible Collection, which provides virtual machine operations and an inventory source for use with Ansible.
|
||||
|
||||
<!--start requires_ansible -->
|
||||
## Ansible and Python version compatibility
|
||||
|
||||
This collection has been tested against Ansible versions **>=2.14,<=2.16** and Python versions **>=3.9,<=3.12**.
|
||||
|
||||
See the [Ansible core support matrix](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix) for supported combinations.
|
||||
<!--end requires_ansible -->
|
||||
|
||||
## Included content
|
||||
|
||||
### Plugins
|
||||
|
||||
* `kubevirt`: Inventory source for KubeVirt VirtualMachines
|
||||
* `kubevirt_vm`: Create or delete KubeVirt VirtualMachines
|
||||
* `kubevirt_vm_info`: Describe KubeVirt VirtualMachines
|
||||
|
||||
## Using this collection
|
||||
|
||||
<!--start galaxy_download -->
|
||||
### Installing the Collection from Ansible Galaxy
|
||||
|
||||
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
|
||||
```bash
|
||||
ansible-galaxy collection install kubevirt.core
|
||||
```
|
||||
<!--end galaxy_download -->
|
||||
|
||||
### Build and install locally
|
||||
|
||||
Clone the repository, checkout the tag you want to build, or pick the main branch for the development version; then:
|
||||
```bash
|
||||
ansible-galaxy collection build .
|
||||
ansible-galaxy collection install kubevirt-kubevirt.core-*.tar.gz
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
|
||||
<!--start collection_dependencies -->
|
||||
#### Ansible collections
|
||||
|
||||
* [kubernetes.core](https://galaxy.ansible.com/ui/repo/published/kubernetes/core)>=3.0.1
|
||||
|
||||
To install all the dependencies:
|
||||
```bash
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
```
|
||||
<!--end collection_dependencies -->
|
||||
|
||||
#### Python libraries
|
||||
|
||||
- jinja2
|
||||
- jsonpatch
|
||||
- kubernetes>=28.1.0
|
||||
- PyYAML>=3.11
|
||||
|
||||
To install all the dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for more details.
|
||||
|
||||
<!--start community_readme -->
|
||||
## Code of Conduct
|
||||
|
||||
We follow the [KubeVirt Code of Conduct](https://github.com/kubevirt/kubevirt/blob/main/CODE_OF_CONDUCT.md).
|
||||
|
||||
## Contributing to this collection
|
||||
|
||||
The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.
|
||||
|
||||
We are actively accepting new contributors.
|
||||
|
||||
Any kind of contribution is very welcome.
|
||||
|
||||
You don't know how to start? Refer to our [contribution guide](CONTRIBUTING.md)!
|
||||
|
||||
We use the following guidelines:
|
||||
|
||||
* [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
* [REVIEW_CHECKLIST.md](REVIEW_CHECKLIST.md)
|
||||
* [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html)
|
||||
* [Ansible Development Guide](https://docs.ansible.com/ansible/devel/dev_guide/index.html)
|
||||
* [Ansible Collection Development Guide](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections)
|
||||
|
||||
## Collection maintenance
|
||||
|
||||
The current maintainers are listed in the [OWNERS](OWNERS) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||
|
||||
To learn how to maintain / become a maintainer of this collection, refer to the [Maintainer guidelines](https://docs.ansible.com/ansible/devel/community/maintainers.html).
|
||||
|
||||
## Release policy
|
||||
|
||||
The release policy of the collection can be found at [docs/releasing.md](docs/releasing.md).
|
||||
|
||||
## Governance
|
||||
|
||||
The process of decision making in this collection is based on discussing and finding consensus among participants.
|
||||
|
||||
Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it!
|
||||
<!--end community_readme -->
|
||||
|
||||
<!--start support -->
|
||||
<!--end support -->
|
||||
|
||||
## Licensing
|
||||
|
||||
GNU General Public License v3.0 or later.
|
||||
|
||||
See [LICENSE](./LICENSE) to see the full text.
|
||||
34
1.3.2/_sources/developing.md.txt
Normal file
34
1.3.2/_sources/developing.md.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
## Contributor's Guidelines
|
||||
|
||||
- All YAML files named with `.yml` extension
|
||||
- Use spaces around jinja variables. `{{ var }}` over `{{var}}`
|
||||
- Variables that are internal to the role should be lowercase and start with the role name
|
||||
- Keep roles self contained - Roles should avoid including tasks from other roles when possible
|
||||
- Plays should do nothing more than include a list of roles except where `pre_tasks` and `post_tasks` are required when possible
|
||||
- Separators - Use valid name, ie. underscores (e.g. `my_role` `my_playbook`) not dashes (`my-role`)
|
||||
- Paths - When defining paths, do not include trailing slashes (e.g. `my_path: /foo` not `my_path: /foo/`). When concatenating paths, follow the same convention (e.g. `{{ my_path }}/bar` not `{{ my_path }}bar`)
|
||||
- Indentation - Use 2 spaces for each indent
|
||||
- `vars/` vs `defaults/` - internal or interpolated variables that don't need to change or be overridden by user go in `vars/`, those that a user would likely override, go under `defaults/` directory
|
||||
- All arguments have a specification in `meta/argument_specs.yml`
|
||||
- All playbooks/roles should be focused on compatibility with Ansible Automation Platform
|
||||
|
||||
## Development environment
|
||||
|
||||
To develop and to run tests you need to install `tox` and `tox-ansible` on
|
||||
your machine.
|
||||
|
||||
```
|
||||
pip install --user tox tox-ansible
|
||||
```
|
||||
|
||||
### Virtualenv for development
|
||||
|
||||
To build a virtualenv for development purposes run the following command:
|
||||
|
||||
```
|
||||
make build-venv
|
||||
```
|
||||
|
||||
The resulting virtualenv will be symlinked to `.venv`, which for example can
|
||||
be selected as virtualenv in VSCode (`Shift+Ctrl+P` and then
|
||||
`Python: Select Interpreter`).
|
||||
26
1.3.2/_sources/index.rst.txt
Normal file
26
1.3.2/_sources/index.rst.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
.. Red Hat kubevirt.core Ansible Collection documentation main file
|
||||
|
||||
Welcome to kubevirt.core Collection documentation
|
||||
=================================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: User documentation
|
||||
|
||||
README
|
||||
plugins/index
|
||||
roles/index
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Developer documentation
|
||||
|
||||
testing
|
||||
developing
|
||||
releasing
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: General
|
||||
|
||||
Changelog <CHANGELOG>
|
||||
16
1.3.2/_sources/plugins/index.rst.txt
Normal file
16
1.3.2/_sources/plugins/index.rst.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
Plugin Index
|
||||
============
|
||||
|
||||
.. toctree::
|
||||
:caption: inventory plugins
|
||||
:maxdepth: 0
|
||||
|
||||
kubevirt
|
||||
|
||||
.. toctree::
|
||||
:caption: modules plugins
|
||||
:maxdepth: 0
|
||||
|
||||
kubevirt_vm
|
||||
kubevirt_vm_info
|
||||
|
||||
940
1.3.2/_sources/plugins/kubevirt.rst.txt
Normal file
940
1.3.2/_sources/plugins/kubevirt.rst.txt
Normal file
@@ -0,0 +1,940 @@
|
||||
|
||||
.. Document meta
|
||||
|
||||
:orphan:
|
||||
|
||||
.. |antsibull-internal-nbsp| unicode:: 0xA0
|
||||
:trim:
|
||||
|
||||
.. meta::
|
||||
:antsibull-docs: 2.10.0
|
||||
|
||||
.. Anchors
|
||||
|
||||
.. _ansible_collections.kubevirt.core.kubevirt_inventory:
|
||||
|
||||
.. Anchors: short name for ansible.builtin
|
||||
|
||||
.. Title
|
||||
|
||||
kubevirt -- Inventory source for KubeVirt VirtualMachines
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. Collection note
|
||||
|
||||
.. note::
|
||||
This inventory plugin is part of the `kubevirt.core collection <https://galaxy.ansible.com/ui/repo/published/kubevirt/core/>`_.
|
||||
|
||||
It is not included in ``ansible-core``.
|
||||
To check whether it is installed, run :code:`ansible-galaxy collection list`.
|
||||
|
||||
To install it, use: :code:`ansible-galaxy collection install kubevirt.core`.
|
||||
You need further requirements to be able to use this inventory plugin,
|
||||
see :ref:`Requirements <ansible_collections.kubevirt.core.kubevirt_inventory_requirements>` for details.
|
||||
|
||||
To use it in a playbook, specify: :code:`kubevirt.core.kubevirt`.
|
||||
|
||||
.. version_added
|
||||
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. Deprecated
|
||||
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. Description
|
||||
|
||||
- Fetch running VirtualMachineInstances for one or more namespaces with an optional label selector.
|
||||
- Groups by namespace, namespace\_vmis and labels.
|
||||
- Uses the kubectl connection plugin to access the Kubernetes cluster.
|
||||
- Uses \*.kubevirt.(yml|yaml) YAML configuration file to set parameter values.
|
||||
|
||||
|
||||
.. Aliases
|
||||
|
||||
|
||||
.. Requirements
|
||||
|
||||
.. _ansible_collections.kubevirt.core.kubevirt_inventory_requirements:
|
||||
|
||||
Requirements
|
||||
------------
|
||||
The below requirements are needed on the local controller node that executes this inventory.
|
||||
|
||||
- python \>= 3.9
|
||||
- kubernetes \>= 28.1.0
|
||||
- PyYAML \>= 3.11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. Options
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<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-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'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-odd">
|
||||
<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-even">
|
||||
<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'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">"memory"</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-odd">
|
||||
<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">"ansible_inventory_"</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-even">
|
||||
<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-odd">
|
||||
<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-even">
|
||||
<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. If no connections are provided, the default <em>~/.kube/config</em> and active context will be used, and objects will be returned for all namespaces the active user is authorized to access.</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-connections/api_key"></div>
|
||||
<p class="ansible-option-title"><strong>api_key</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Token used to authenticate with the API. Can also be specified via K8S_AUTH_API_KEY 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-connections/api_version"></div>
|
||||
<p class="ansible-option-title"><strong>api_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><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">"kubevirt.io/v1"</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-connections/append_base_domain"></div>
|
||||
<p class="ansible-option-title"><strong>append_base_domain</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Append the base domain of the cluster to host names constructed from SSH services of type NodePort.</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-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/base_domain"></div>
|
||||
<p class="ansible-option-title"><strong>base_domain</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Override the base domain used to construct host names of VirtualMachines. Used in case of kubesecondarydns or services of type NodePort if append_base_domain is set.</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-connections/ca_cert"></div>
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/ssl_ca_cert"></div>
|
||||
<p class="ansible-option-title"><strong>ca_cert</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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">string</span>
|
||||
</p>
|
||||
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Path to a CA certificate used to authenticate with the API. Can also be specified via K8S_AUTH_SSL_CA_CERT 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-connections/client_cert"></div>
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/cert_file"></div>
|
||||
<p class="ansible-option-title"><strong>client_cert</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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">string</span>
|
||||
</p>
|
||||
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Path to a certificate used to authenticate with the API. Can also be specified via K8S_AUTH_CERT_FILE 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-connections/client_key"></div>
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/key_file"></div>
|
||||
<p class="ansible-option-title"><strong>client_key</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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">string</span>
|
||||
</p>
|
||||
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Path to a key file used to authenticate with the API. Can also be specified via K8S_AUTH_KEY_FILE 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-connections/context"></div>
|
||||
<p class="ansible-option-title"><strong>context</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>The name of a context found in the config file. Can also be specified via K8S_AUTH_CONTEXT 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-connections/create_groups"></div>
|
||||
<p class="ansible-option-title"><strong>create_groups</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Enable the creation of groups from labels on VirtualMachines.</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-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/host"></div>
|
||||
<p class="ansible-option-title"><strong>host</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST 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-connections/kube_secondary_dns"></div>
|
||||
<p class="ansible-option-title"><strong>kube_secondary_dns</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Enable kubesecondarydns 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-even">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/kubeconfig"></div>
|
||||
<p class="ansible-option-title"><strong>kubeconfig</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/kubeconfig" 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>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>. Can also be specified via K8S_AUTH_KUBECONFIG 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-connections/label_selector"></div>
|
||||
<p class="ansible-option-title"><strong>label_selector</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Define a label selector to select a subset of the fetched VirtualMachineInstances.</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-connections/name"></div>
|
||||
<p class="ansible-option-title"><strong>name</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><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-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/namespaces"></div>
|
||||
<p class="ansible-option-title"><strong>namespaces</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>List of namespaces. If not specified, will fetch all VirtualMachineInstances for all namespaces the user is authorized to access.</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-connections/network_name"></div>
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/interface_name"></div>
|
||||
<p class="ansible-option-title"><strong>network_name</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>In case multiple networks are attached to a VirtualMachineInstance, define which interface should be returned as primary IP address.</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-connections/password"></div>
|
||||
<p class="ansible-option-title"><strong>password</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Provide a password for authenticating with the API. Can also be specified via K8S_AUTH_PASSWORD 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-connections/use_service"></div>
|
||||
<p class="ansible-option-title"><strong>use_service</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Enable the use of services to establish an SSH connection to the VirtualMachine.</p>
|
||||
<p>Services are only used if no network_name 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-odd">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/username"></div>
|
||||
<p class="ansible-option-title"><strong>username</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Provide a username for authenticating with the API. Can also be specified via K8S_AUTH_USERNAME 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-connections/validate_certs"></div>
|
||||
<div class="ansibleOptionAnchor" id="parameter-connections/verify_ssl"></div>
|
||||
<p class="ansible-option-title"><strong>validate_certs</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-connections/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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Whether or not to verify the API server's SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL 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>
|
||||
|
||||
<tr class="row-odd">
|
||||
<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-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: name, namespace, uid.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">"{namespace}-{name}"</code></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'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">""</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">"_"</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-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 keyed_groups.</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 "" and the default separator is "_".</p>
|
||||
<p>Set this option to False 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-odd">
|
||||
<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 "kubevirt" 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">"kubevirt"</code></p></li>
|
||||
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">"kubevirt.core.kubevirt"</code></p></li>
|
||||
</ul>
|
||||
|
||||
</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-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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
.. Attributes
|
||||
|
||||
|
||||
.. Notes
|
||||
|
||||
|
||||
.. Seealso
|
||||
|
||||
|
||||
.. Examples
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
# Filename must end with kubevirt.[yml|yaml]
|
||||
|
||||
- name: Authenticate with token and return all VirtualMachineInstances for all accessible namespaces
|
||||
plugin: kubevirt.core.kubevirt
|
||||
connections:
|
||||
- host: https://192.168.64.4:8443
|
||||
api_key: xxxxxxxxxxxxxxxx
|
||||
validate_certs: false
|
||||
|
||||
- name: Use default ~/.kube/config and return VirtualMachineInstances from namespace testing connected to network bridge-network
|
||||
plugin: kubevirt.core.kubevirt
|
||||
connections:
|
||||
- namespaces:
|
||||
- testing
|
||||
network_name: bridge-network
|
||||
|
||||
- name: Use default ~/.kube/config and return VirtualMachineInstances from namespace testing with label app=test
|
||||
plugin: kubevirt.core.kubevirt
|
||||
connections:
|
||||
- namespaces:
|
||||
- testing
|
||||
label_selector: app=test
|
||||
|
||||
- name: Use a custom config file and a specific context
|
||||
plugin: kubevirt.core.kubevirt
|
||||
connections:
|
||||
- kubeconfig: /path/to/config
|
||||
context: 'awx/192-168-64-4:8443/developer'
|
||||
|
||||
|
||||
|
||||
|
||||
.. Facts
|
||||
|
||||
|
||||
.. Return values
|
||||
|
||||
|
||||
.. Status (Presently only deprecated)
|
||||
|
||||
|
||||
.. Authors
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
- KubeVirt.io Project
|
||||
|
||||
|
||||
.. hint::
|
||||
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.
|
||||
|
||||
.. Extra links
|
||||
|
||||
|
||||
.. Parsing errors
|
||||
|
||||
938
1.3.2/_sources/plugins/kubevirt_vm.rst.txt
Normal file
938
1.3.2/_sources/plugins/kubevirt_vm.rst.txt
Normal file
@@ -0,0 +1,938 @@
|
||||
|
||||
.. Document meta
|
||||
|
||||
:orphan:
|
||||
|
||||
.. |antsibull-internal-nbsp| unicode:: 0xA0
|
||||
:trim:
|
||||
|
||||
.. meta::
|
||||
:antsibull-docs: 2.10.0
|
||||
|
||||
.. Anchors
|
||||
|
||||
.. _ansible_collections.kubevirt.core.kubevirt_vm_module:
|
||||
|
||||
.. Anchors: short name for ansible.builtin
|
||||
|
||||
.. Title
|
||||
|
||||
kubevirt_vm -- Create or delete KubeVirt VirtualMachines
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. Collection note
|
||||
|
||||
.. note::
|
||||
This module is part of the `kubevirt.core collection <https://galaxy.ansible.com/ui/repo/published/kubevirt/core/>`_.
|
||||
|
||||
It is not included in ``ansible-core``.
|
||||
To check whether it is installed, run :code:`ansible-galaxy collection list`.
|
||||
|
||||
To install it, use: :code:`ansible-galaxy collection install kubevirt.core`.
|
||||
You need further requirements to be able to use this module,
|
||||
see :ref:`Requirements <ansible_collections.kubevirt.core.kubevirt_vm_module_requirements>` for details.
|
||||
|
||||
To use it in a playbook, specify: :code:`kubevirt.core.kubevirt_vm`.
|
||||
|
||||
.. version_added
|
||||
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. Deprecated
|
||||
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. Description
|
||||
|
||||
- Use the Kubernetes Python client to perform create or delete 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.
|
||||
|
||||
|
||||
.. Aliases
|
||||
|
||||
|
||||
.. Requirements
|
||||
|
||||
.. _ansible_collections.kubevirt.core.kubevirt_vm_module_requirements:
|
||||
|
||||
Requirements
|
||||
------------
|
||||
The below requirements are needed on the host that executes this module.
|
||||
|
||||
- python \>= 3.9
|
||||
- kubernetes \>= 28.1.0
|
||||
- PyYAML \>= 3.11
|
||||
- jsonpatch
|
||||
- jinja2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. Options
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<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-annotations"></div>
|
||||
<p class="ansible-option-title"><strong>annotations</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-annotations" 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>Specify annotations to set on the VirtualMachine.</p>
|
||||
<p>Only used when <em>state=present</em>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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. Can also be specified via K8S_AUTH_API_KEY environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>Use this to set the API version of KubeVirt.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">"kubevirt.io/v1"</code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable.</p>
|
||||
</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. Can also be specified via K8S_AUTH_CERT_FILE 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. Can also be specified via K8S_AUTH_KEY_FILE environment variable.</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. Can also be specified via K8S_AUTH_CONTEXT environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-data_volume_templates"></div>
|
||||
<p class="ansible-option-title"><strong>data_volume_templates</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-data_volume_templates" 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>Specify the DataVolume templates of the VirtualMachine.</p>
|
||||
<p>See: https://kubevirt.io/api-reference/main/definitions.html#_v1_datavolumetemplatespec</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-delete_options"></div>
|
||||
<p class="ansible-option-title"><strong>delete_options</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-delete_options" title="Permalink to this option"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">dictionary</span>
|
||||
</p>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 1.2.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Configure behavior when deleting an object.</p>
|
||||
<p>Only used when <em>state=absent</em>.</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-delete_options/gracePeriodSeconds"></div>
|
||||
<p class="ansible-option-title"><strong>gracePeriodSeconds</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-delete_options/gracePeriodSeconds" 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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Specify how many seconds to wait before forcefully terminating.</p>
|
||||
<p>Only implemented for Pod resources.</p>
|
||||
<p>If not specified, the default grace period for the object type will be used.</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-delete_options/preconditions"></div>
|
||||
<p class="ansible-option-title"><strong>preconditions</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-delete_options/preconditions" 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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Specify condition that must be met for delete to proceed.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-delete_options/preconditions/resourceVersion"></div>
|
||||
<p class="ansible-option-title"><strong>resourceVersion</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-delete_options/preconditions/resourceVersion" 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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Specify the resource version of the target object.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-delete_options/preconditions/uid"></div>
|
||||
<p class="ansible-option-title"><strong>uid</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-delete_options/preconditions/uid" 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-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Specify the UID of the target object.</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-delete_options/propagationPolicy"></div>
|
||||
<p class="ansible-option-title"><strong>propagationPolicy</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-delete_options/propagationPolicy" 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>Use to control how dependent objects are deleted.</p>
|
||||
<p>If not specified, the default policy for the object type will be used. This may vary across object types.</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">"Foreground"</code></p></li>
|
||||
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">"Background"</code></p></li>
|
||||
<li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">"Orphan"</code></p></li>
|
||||
</ul>
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-force"></div>
|
||||
<p class="ansible-option-title"><strong>force</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force" 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 set to <code class='docutils literal notranslate'>yes</code>, and <em>state</em> is <code class='docutils literal notranslate'>present</code>, an existing object will be replaced.</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-generate_name"></div>
|
||||
<p class="ansible-option-title"><strong>generate_name</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-generate_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>Specify the basis of the VirtualMachine name and random characters will be added automatically on server to generate a unique name.</p>
|
||||
<p>Only used when <em>state=present</em>.</p>
|
||||
<p>mutually exclusive with <code class='docutils literal notranslate'>name</code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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. Can also be specified via K8S_AUTH_HOST environment variable.</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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Group(s) to impersonate for the operation.</p>
|
||||
<p>Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2</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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Username to impersonate for the operation.</p>
|
||||
<p>Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-instancetype"></div>
|
||||
<p class="ansible-option-title"><strong>instancetype</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-instancetype" 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>Specify the instancetype matcher of the VirtualMachine.</p>
|
||||
<p>Only used when <em>state=present</em>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>. Can also be specified via K8S_AUTH_KUBECONFIG environment variable.</p>
|
||||
<p>Multiple Kubernetes config file can be provided using separator ';' for Windows platform or ':' for others platforms.</p>
|
||||
<p>The kubernetes configuration can be provided as dictionary. This feature requires a python kubernetes client version >= 17.17.0. Added in version 2.2.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-labels"></div>
|
||||
<p class="ansible-option-title"><strong>labels</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-labels" 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>Specify labels to set on the VirtualMachine.</p>
|
||||
</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>Specify the name of the VirtualMachine.</p>
|
||||
<p>This option is ignored when <em>state</em> is not set to <code class='docutils literal notranslate'>present</code>.</p>
|
||||
<p>mutually exclusive with <code class='docutils literal notranslate'>generate_name</code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-namespace"></div>
|
||||
<p class="ansible-option-title"><strong>namespace</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-namespace" 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>Specify the namespace of the VirtualMachine.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>The comma separated list of hosts/domains/IP/CIDR that shouldn't go through proxy. Can also be specified via K8S_AUTH_NO_PROXY environment variable.</p>
|
||||
<p>Please note that this module does not pick up typical proxy settings from the environment (e.g. NO_PROXY).</p>
|
||||
<p>This feature requires kubernetes>=19.15.0. When kubernetes library is less than 19.15.0, it fails even no_proxy set in correct.</p>
|
||||
<p>example value is "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"</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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. Can also be specified via K8S_AUTH_PASSWORD environment variable.</p>
|
||||
<p>Please read the description of the <code class='docutils literal notranslate'>username</code> option for a discussion of when this option is applicable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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. Can also be specified via K8S_AUTH_PERSIST_CONFIG 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>Default to false.</p>
|
||||
<p>Please note that the current version of the k8s python client library does not support setting this flag to True yet.</p>
|
||||
<p>The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169</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-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-preference"></div>
|
||||
<p class="ansible-option-title"><strong>preference</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-preference" 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>Specify the preference matcher of the VirtualMachine.</p>
|
||||
<p>Only used when <em>state=present</em>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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. Can also be specified via K8S_AUTH_PROXY environment variable.</p>
|
||||
<p>Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP_PROXY).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.0.0</em></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-even">
|
||||
<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 K8S_AUTH_PROXY_HEADERS_BASIC_AUTH environment.</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/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 K8S_AUTH_PROXY_HEADERS_PROXY_BASIC_AUTH environment.</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/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 K8S_AUTH_PROXY_HEADERS_USER_AGENT environment.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
<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>
|
||||
<a class="ansibleOptionLink" href="#parameter-running" 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>Specify whether the VirtualMachine should be running.</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-spec"></div>
|
||||
<p class="ansible-option-title"><strong>spec</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-spec" 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>Specify the template spec of the VirtualMachine.</p>
|
||||
<p>See: https://kubevirt.io/api-reference/main/definitions.html#_v1_virtualmachineinstancespec</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<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>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" 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>Determines if an object should be created, patched, or deleted. When set to <code class='docutils literal notranslate'>present</code>, an object will be created, if it does not already exist. If set to <code class='docutils literal notranslate'>absent</code>, an existing object will be deleted. If set to <code class='docutils literal notranslate'>present</code>, an existing object will be patched, if its attributes differ from those specified using <em>resource_definition</em> or <em>src</em>.</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>
|
||||
</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. Can also be specified via K8S_AUTH_USERNAME environment variable.</p>
|
||||
<p>Please note that this only works with clusters configured to use HTTP Basic Auth. If your cluster has a different form of authentication (e.g. OAuth2 in OpenShift), this option will not work as expected and you should look into the <a href='../../community/okd/k8s_auth_module.html' class='module'>community.okd.k8s_auth</a> module, as that might do what you need.</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's SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL 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>
|
||||
<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>
|
||||
<a class="ansibleOptionLink" href="#parameter-wait" 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 to wait for the VirtualMachine to end up in the ready state.</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-wait_sleep"></div>
|
||||
<p class="ansible-option-title"><strong>wait_sleep</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-wait_sleep" 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>Number of seconds to sleep between checks.</p>
|
||||
<p>Ignored if <code class='docutils literal notranslate'>wait</code> is not set.</p>
|
||||
<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-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>
|
||||
<a class="ansibleOptionLink" href="#parameter-wait_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>How long in seconds to wait for the resource to end up in the desired state.</p>
|
||||
<p>Ignored if <code class='docutils literal notranslate'>wait</code> is not set.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">120</code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
.. Attributes
|
||||
|
||||
|
||||
.. Notes
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
.. note::
|
||||
- To avoid SSL certificate validation errors when \ :literal:`validate\_certs`\ is \ :emphasis:`True`\ , the full certificate chain for the API server must be provided via \ :literal:`ca\_cert`\ or in the kubeconfig file.
|
||||
|
||||
.. Seealso
|
||||
|
||||
|
||||
.. Examples
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Create a VirtualMachine
|
||||
kubevirt.core.kubevirt_vm:
|
||||
state: present
|
||||
name: testvm
|
||||
namespace: default
|
||||
labels:
|
||||
app: test
|
||||
instancetype:
|
||||
name: u1.medium
|
||||
preference:
|
||||
name: fedora
|
||||
spec:
|
||||
domain:
|
||||
devices:
|
||||
interfaces:
|
||||
- name: default
|
||||
masquerade: {}
|
||||
- name: bridge-network
|
||||
bridge: {}
|
||||
networks:
|
||||
- name: default
|
||||
pod: {}
|
||||
- name: bridge-network
|
||||
multus:
|
||||
networkName: kindexgw
|
||||
volumes:
|
||||
- containerDisk:
|
||||
image: quay.io/containerdisks/fedora:latest
|
||||
name: containerdisk
|
||||
- cloudInitNoCloud:
|
||||
userData: |-
|
||||
#cloud-config
|
||||
# The default username is: fedora
|
||||
ssh_authorized_keys:
|
||||
- ssh-ed25519 AAAA...
|
||||
name: cloudinit
|
||||
|
||||
- name: Create a VirtualMachine with a DataVolume template
|
||||
kubevirt.core.kubevirt_vm:
|
||||
state: present
|
||||
name: testvm-with-dv
|
||||
namespace: default
|
||||
labels:
|
||||
app: test
|
||||
instancetype:
|
||||
name: u1.medium
|
||||
preference:
|
||||
name: fedora
|
||||
data_volume_templates:
|
||||
- metadata:
|
||||
name: testdv
|
||||
spec:
|
||||
source:
|
||||
registry:
|
||||
url: docker://quay.io/containerdisks/fedora:latest
|
||||
storage:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
spec:
|
||||
domain:
|
||||
devices: {}
|
||||
volumes:
|
||||
- dataVolume:
|
||||
name: testdv
|
||||
name: datavolume
|
||||
- cloudInitNoCloud:
|
||||
userData: |-
|
||||
#cloud-config
|
||||
# The default username is: fedora
|
||||
ssh_authorized_keys:
|
||||
- ssh-ed25519 AAAA...
|
||||
name: cloudinit
|
||||
wait: true
|
||||
|
||||
- name: Delete a VirtualMachine
|
||||
kubevirt.core.kubevirt_vm:
|
||||
name: testvm
|
||||
namespace: default
|
||||
state: absent
|
||||
|
||||
|
||||
|
||||
|
||||
.. Facts
|
||||
|
||||
|
||||
.. Return values
|
||||
|
||||
Return Values
|
||||
-------------
|
||||
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table class="colwidths-auto ansible-option-table docutils align-default" style="width: 100%">
|
||||
<thead>
|
||||
<tr class="row-odd">
|
||||
<th class="head"><p>Key</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-result"></div>
|
||||
<p class="ansible-option-title"><strong>result</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-result" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">complex</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>The created object. Will be empty in the case of a deletion.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-result/changed"></div>
|
||||
<p class="ansible-option-title"><strong>changed</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-result/changed" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">boolean</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Whether the VirtualMachine was changed</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-value literal notranslate ansible-option-sample">true</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="return-result/duration"></div>
|
||||
<p class="ansible-option-title"><strong>duration</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-result/duration" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">integer</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>elapsed time of task in seconds</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> when <code class='docutils literal notranslate'>wait</code> is true</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-value literal notranslate ansible-option-sample">48</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="return-result/method"></div>
|
||||
<p class="ansible-option-title"><strong>method</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-result/method" title="Permalink to this return value"></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>Method executed on the Kubernetes API.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
.. Status (Presently only deprecated)
|
||||
|
||||
|
||||
.. Authors
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
- KubeVirt.io Project
|
||||
|
||||
|
||||
|
||||
.. Extra links
|
||||
|
||||
|
||||
.. Parsing errors
|
||||
|
||||
698
1.3.2/_sources/plugins/kubevirt_vm_info.rst.txt
Normal file
698
1.3.2/_sources/plugins/kubevirt_vm_info.rst.txt
Normal file
@@ -0,0 +1,698 @@
|
||||
|
||||
.. Document meta
|
||||
|
||||
:orphan:
|
||||
|
||||
.. |antsibull-internal-nbsp| unicode:: 0xA0
|
||||
:trim:
|
||||
|
||||
.. meta::
|
||||
:antsibull-docs: 2.10.0
|
||||
|
||||
.. Anchors
|
||||
|
||||
.. _ansible_collections.kubevirt.core.kubevirt_vm_info_module:
|
||||
|
||||
.. Anchors: short name for ansible.builtin
|
||||
|
||||
.. Title
|
||||
|
||||
kubevirt_vm_info -- Describe KubeVirt VirtualMachines
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. Collection note
|
||||
|
||||
.. note::
|
||||
This module is part of the `kubevirt.core collection <https://galaxy.ansible.com/ui/repo/published/kubevirt/core/>`_.
|
||||
|
||||
It is not included in ``ansible-core``.
|
||||
To check whether it is installed, run :code:`ansible-galaxy collection list`.
|
||||
|
||||
To install it, use: :code:`ansible-galaxy collection install kubevirt.core`.
|
||||
You need further requirements to be able to use this module,
|
||||
see :ref:`Requirements <ansible_collections.kubevirt.core.kubevirt_vm_info_module_requirements>` for details.
|
||||
|
||||
To use it in a playbook, specify: :code:`kubevirt.core.kubevirt_vm_info`.
|
||||
|
||||
.. version_added
|
||||
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. Deprecated
|
||||
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. Description
|
||||
|
||||
- Use the Kubernetes Python client to perform read operations on KubeVirt VirtualMachines.
|
||||
- Pass options to find VirtualMachines as module arguments.
|
||||
- Authenticate using either a config file, certificates, password or token.
|
||||
- Supports check mode.
|
||||
|
||||
|
||||
.. Aliases
|
||||
|
||||
|
||||
.. Requirements
|
||||
|
||||
.. _ansible_collections.kubevirt.core.kubevirt_vm_info_module_requirements:
|
||||
|
||||
Requirements
|
||||
------------
|
||||
The below requirements are needed on the host that executes this module.
|
||||
|
||||
- python \>= 3.9
|
||||
- kubernetes \>= 28.1.0
|
||||
- PyYAML \>= 3.11
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. Options
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<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. Can also be specified via K8S_AUTH_API_KEY 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>Use this to set the API version of KubeVirt.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">"kubevirt.io/v1"</code></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. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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. Can also be specified via K8S_AUTH_CERT_FILE environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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. Can also be specified via K8S_AUTH_KEY_FILE environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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. Can also be specified via K8S_AUTH_CONTEXT environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-field_selectors"></div>
|
||||
<p class="ansible-option-title"><strong>field_selectors</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-field_selectors" 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>List of field selectors to use to filter results</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. Can also be specified via K8S_AUTH_HOST environment variable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<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>
|
||||
<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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Group(s) to impersonate for the operation.</p>
|
||||
<p>Can also be specified via K8S_AUTH_IMPERSONATE_GROUPS environment. Example: Group1,Group2</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<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>
|
||||
<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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>Username to impersonate for the operation.</p>
|
||||
<p>Can also be specified via K8S_AUTH_IMPERSONATE_USER environment.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>. Can also be specified via K8S_AUTH_KUBECONFIG environment variable.</p>
|
||||
<p>Multiple Kubernetes config file can be provided using separator ';' for Windows platform or ':' for others platforms.</p>
|
||||
<p>The kubernetes configuration can be provided as dictionary. This feature requires a python kubernetes client version >= 17.17.0. Added in version 2.2.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-label_selectors"></div>
|
||||
<p class="ansible-option-title"><strong>label_selectors</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-label_selectors" 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>List of label selectors to use to filter results</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-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>Specify the name of the VirtualMachine.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-namespace"></div>
|
||||
<p class="ansible-option-title"><strong>namespace</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-namespace" 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 namespace of VirtualMachines.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>The comma separated list of hosts/domains/IP/CIDR that shouldn't go through proxy. Can also be specified via K8S_AUTH_NO_PROXY environment variable.</p>
|
||||
<p>Please note that this module does not pick up typical proxy settings from the environment (e.g. NO_PROXY).</p>
|
||||
<p>This feature requires kubernetes>=19.15.0. When kubernetes library is less than 19.15.0, it fails even no_proxy set in correct.</p>
|
||||
<p>example value is "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"</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<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. Can also be specified via K8S_AUTH_PASSWORD environment variable.</p>
|
||||
<p>Please read the description of the <code class='docutils literal notranslate'>username</code> option for a discussion of when this option is applicable.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<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. Can also be specified via K8S_AUTH_PERSIST_CONFIG 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>Default to false.</p>
|
||||
<p>Please note that the current version of the k8s python client library does not support setting this flag to True yet.</p>
|
||||
<p>The fix for this k8s python library is here: https://github.com/kubernetes-client/python-base/pull/169</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-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. Can also be specified via K8S_AUTH_PROXY environment variable.</p>
|
||||
<p>Please note that this module does not pick up typical proxy settings from the environment (e.g. HTTP_PROXY).</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>
|
||||
<p><em class="ansible-option-versionadded">added in kubevirt.core 2.0.0</em></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 K8S_AUTH_PROXY_HEADERS_BASIC_AUTH environment.</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 K8S_AUTH_PROXY_HEADERS_PROXY_BASIC_AUTH environment.</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 K8S_AUTH_PROXY_HEADERS_USER_AGENT environment.</p>
|
||||
</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. Can also be specified via K8S_AUTH_USERNAME environment variable.</p>
|
||||
<p>Please note that this only works with clusters configured to use HTTP Basic Auth. If your cluster has a different form of authentication (e.g. OAuth2 in OpenShift), this option will not work as expected and you should look into the <a href='../../community/okd/k8s_auth_module.html' class='module'>community.okd.k8s_auth</a> module, as that might do what you need.</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's SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL 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>
|
||||
<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>
|
||||
<a class="ansibleOptionLink" href="#parameter-wait" 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 to wait for the VirtualMachine to end up in the ready state.</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-wait_sleep"></div>
|
||||
<p class="ansible-option-title"><strong>wait_sleep</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-wait_sleep" 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>Number of seconds to sleep between checks.</p>
|
||||
<p>Ignored if <code class='docutils literal notranslate'>wait</code> is not set.</p>
|
||||
<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-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>
|
||||
<a class="ansibleOptionLink" href="#parameter-wait_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>How long in seconds to wait for the resource to end up in the desired state.</p>
|
||||
<p>Ignored if <code class='docutils literal notranslate'>wait</code> is not set.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">120</code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
.. Attributes
|
||||
|
||||
|
||||
.. Notes
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
.. note::
|
||||
- To avoid SSL certificate validation errors when \ :literal:`validate\_certs`\ is \ :emphasis:`True`\ , the full certificate chain for the API server must be provided via \ :literal:`ca\_cert`\ or in the kubeconfig file.
|
||||
|
||||
.. Seealso
|
||||
|
||||
|
||||
.. Examples
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Get an existing VirtualMachine
|
||||
kubevirt.core.kubevirt_vm_info:
|
||||
name: testvm
|
||||
namespace: default
|
||||
register: default_testvm
|
||||
|
||||
- name: Get a list of all VirtualMachines
|
||||
kubevirt.core.kubevirt_vm_info:
|
||||
namespace: default
|
||||
register: vm_list
|
||||
|
||||
- name: Get a list of all VirtualMachines from any namespace
|
||||
kubevirt.core.kubevirt_vm_info:
|
||||
register: vm_list
|
||||
|
||||
- name: Search for all VirtualMachines labelled app=test
|
||||
kubevirt.core.kubevirt_vm_info:
|
||||
label_selectors:
|
||||
- app=test
|
||||
|
||||
- name: Wait until the VirtualMachine is Ready
|
||||
kubevirt.core.kubevirt_vm_info:
|
||||
name: testvm
|
||||
namespace: default
|
||||
wait: true
|
||||
|
||||
|
||||
|
||||
|
||||
.. Facts
|
||||
|
||||
|
||||
.. Return values
|
||||
|
||||
Return Values
|
||||
-------------
|
||||
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<table class="colwidths-auto ansible-option-table docutils align-default" style="width: 100%">
|
||||
<thead>
|
||||
<tr class="row-odd">
|
||||
<th class="head"><p>Key</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-api_found"></div>
|
||||
<p class="ansible-option-title"><strong>api_found</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-api_found" title="Permalink to this return value"></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 the specified api_version and VirtualMachine kind were successfully mapped to an existing API on the targeted cluster.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-resources"></div>
|
||||
<p class="ansible-option-title"><strong>resources</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-resources" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">complex</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell">
|
||||
<p>The VirtualMachine(s) that exists</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-resources/api_version"></div>
|
||||
<p class="ansible-option-title"><strong>api_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-resources/api_version" title="Permalink to this return value"></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 versioned schema of this representation of an object.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-resources/kind"></div>
|
||||
<p class="ansible-option-title"><strong>kind</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-resources/kind" title="Permalink to this return value"></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>Represents the REST resource this object represents.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-resources/metadata"></div>
|
||||
<p class="ansible-option-title"><strong>metadata</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-resources/metadata" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">dictionary</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Standard object metadata. Includes name, namespace, annotations, labels, etc.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-resources/spec"></div>
|
||||
<p class="ansible-option-title"><strong>spec</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-resources/spec" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">dictionary</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Specific attributes of the VirtualMachine. Can vary based on the <em>api_version</em>.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-resources/status"></div>
|
||||
<p class="ansible-option-title"><strong>status</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-resources/status" title="Permalink to this return value"></a>
|
||||
<p class="ansible-option-type-line">
|
||||
<span class="ansible-option-type">dictionary</span>
|
||||
</p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
|
||||
<p>Current status details for the VirtualMachine.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
.. Status (Presently only deprecated)
|
||||
|
||||
|
||||
.. Authors
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
- KubeVirt.io Project
|
||||
|
||||
|
||||
|
||||
.. Extra links
|
||||
|
||||
|
||||
.. Parsing errors
|
||||
|
||||
61
1.3.2/_sources/releasing.md.txt
Normal file
61
1.3.2/_sources/releasing.md.txt
Normal file
@@ -0,0 +1,61 @@
|
||||
# Collection Versioning Strategy
|
||||
|
||||
Each supported collection maintained by Ansible follows Semantic Versioning 2.0.0 (https://semver.org/), for example:
|
||||
Given a version number MAJOR.MINOR.PATCH, the following is incremented:
|
||||
|
||||
MAJOR version: when making incompatible API changes (see Feature Release scenarios below for examples)
|
||||
|
||||
MINOR version: when adding features or functionality in a backwards compatible manner, or updating testing matrix and/or metadata (deprecation)
|
||||
|
||||
PATCH version: when adding backwards compatible bug fixes or security fixes (strict).
|
||||
|
||||
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
|
||||
|
||||
The first version of a generally available supported collection on Ansible Automation Hub shall be version 1.0.0. NOTE: By default, all newly created collections may begin with a smaller default version of 0.1.0, and therefore a version of 1.0.0 should be explicitly stated by the collection maintainer.
|
||||
|
||||
## New content is added to an existing collection
|
||||
|
||||
Assuming the current release is 1.0.0, and a new module is ready to be added to the collection, the minor version would be incremented to 1.1.0. The change in the MINOR version indicates an additive change was made while maintaining backward compatibility for existing content within the collection.
|
||||
|
||||
|
||||
## New feature to existing plugin or role within a collection (backwards compatible)
|
||||
|
||||
Assuming the current release is 1.0.0, and new features for an existing module are ready for release . We would increment the MINOR version to 1.1.0. The change in the MINOR version indicates an additive change was made while maintaining backward compatibility for existing content within the collection.
|
||||
|
||||
|
||||
## Bug fix or security fix to existing content within a collection
|
||||
|
||||
Assuming the current release is 1.0.0 and a bug is fixed prior to the next minor release, the PATCH version would be incremented to 1.0.1. The patch indicates only a bug was fixed within a current version. The PATCH release does not contain new content, nor was functionality removed. Bug fixes may be included in a MINOR or MAJOR feature release if the timing allows, eliminating the need for a PATCH dedicated to the fix.
|
||||
|
||||
|
||||
## Breaking change to any content within a collection
|
||||
|
||||
Assuming the current release is 1.0.0, and a breaking change (API or module) is introduced for a user or developer. The MAJOR version would be incremented to 2.0.0.
|
||||
|
||||
Examples of breaking changes within a collection may include but are not limited to:
|
||||
|
||||
- Argspec changes for a module that require either inventory structure or playbook changes.
|
||||
- A change in the shape of either the inbound or returned payload of a filter plugin.
|
||||
- Changes to a connection plugin that require additional inventory parameters or ansible.cfg entries.
|
||||
- New functionality added to a module that changes the outcome of that module as released in previous versions.
|
||||
- The removal of plugins from a collection.
|
||||
|
||||
|
||||
## Content removed from a collection
|
||||
|
||||
Deleting a module or API is a breaking change. Please see the 'Breaking change' section for how to version this.
|
||||
|
||||
|
||||
## A typographical error was fixed in the documentation for a collection
|
||||
|
||||
A correction to the README would be considered a bug fix and the PATCH incremented. See 'Bug fix' above.
|
||||
|
||||
|
||||
## Documentation added/removed/modified within a collection
|
||||
|
||||
Only the PATCH version should be increased for a release that contains changes limited to revised documentation.
|
||||
|
||||
|
||||
## Release automation
|
||||
|
||||
New releases are triggered by annotated git tags named after semantic versioning. The automation publishes the built artifacts to ansible-galaxy and github releases page.
|
||||
5
1.3.2/_sources/roles/index.rst.txt
Normal file
5
1.3.2/_sources/roles/index.rst.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Role Index
|
||||
==========
|
||||
|
||||
.. toctree::
|
||||
*
|
||||
112
1.3.2/_sources/testing.md.txt
Normal file
112
1.3.2/_sources/testing.md.txt
Normal file
@@ -0,0 +1,112 @@
|
||||
# Testing
|
||||
|
||||
## Sanity and unit tests
|
||||
|
||||
Sanity and unit tests can be run in two ways:
|
||||
|
||||
- with `tox` and the `tox-ansible` plugin (both need to be installed on the dev machine)
|
||||
- with `ansible-test`
|
||||
|
||||
For development purposes `tox` and `tox-ansible` are better suited, as they allow
|
||||
debugging of issues in the collection on the developer's machine.
|
||||
|
||||
For verification purposes of the collection the compatibility with `ansible-test`
|
||||
is ensured.
|
||||
|
||||
### Running tests with tox-ansible
|
||||
|
||||
Run sanity tests with `tox-ansible` like so:
|
||||
|
||||
```
|
||||
make test-sanity
|
||||
```
|
||||
|
||||
Run unit tests with `tox-ansible` like so:
|
||||
|
||||
```
|
||||
make test-unit
|
||||
```
|
||||
|
||||
### Running tests with ansible-test
|
||||
|
||||
In order to test changes with `ansible-test`, it is recommended to bind mount
|
||||
the repository to `~/.ansible/collections/ansible_collections/kubevirt/core`
|
||||
if you did not check it out into this location.
|
||||
|
||||
This can be done with:
|
||||
|
||||
```
|
||||
mkdir -p ~/.ansible/collections/ansible_collections/kubevirt/core
|
||||
sudo mount --bind <project_dir>/kubevirt.core ~/.ansible/collections/ansible_collections/kubevirt/core
|
||||
cd ~/.ansible/collections/ansible_collections/kubevirt/core
|
||||
```
|
||||
|
||||
Run sanity tests with `ansible-test` like so:
|
||||
|
||||
```
|
||||
ANSIBLE_TEST_PREFER_PODMAN=1 ansible-test sanity --docker
|
||||
```
|
||||
|
||||
Run unit tests with `ansible-test` like so:
|
||||
|
||||
```
|
||||
ANSIBLE_TEST_PREFER_PODMAN=1 ansible-test units --docker
|
||||
```
|
||||
|
||||
## Integration tests
|
||||
|
||||
Integration tests require a working cluster and can be run with
|
||||
`ansible-test`.
|
||||
|
||||
### Continuous integration
|
||||
|
||||
The `hack/e2e-setup.sh` script contains the steps necessary to reproduce the
|
||||
CI integration test environment, which relies on `docker` or `podman`,
|
||||
`kubectl` and `kind`.
|
||||
|
||||
To create the CI integration test environment on your machine run:
|
||||
|
||||
```
|
||||
make cluster-up
|
||||
```
|
||||
|
||||
To remove the test CI integration test environment run:
|
||||
|
||||
```
|
||||
make cluster-down
|
||||
```
|
||||
|
||||
### Running integration tests with ansible test
|
||||
|
||||
Run integration tests with ansible-test like so:
|
||||
|
||||
```
|
||||
ansible-test integration
|
||||
```
|
||||
|
||||
## Example config and playbooks
|
||||
|
||||
Sample playbooks and inventory configurations are provided in the `examples/` directory; to run the playbooks locally, build the testing environment with the script above, then the steps are as follows:
|
||||
|
||||
```bash
|
||||
# setup environment
|
||||
pip install ansible-core
|
||||
# clone the repository
|
||||
git clone https://github.com/kubevirt/kubevirt.core
|
||||
cd kubevirt.core
|
||||
# install collection dependencies
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
# install collection python deps
|
||||
pip install -r requirements.txt
|
||||
# setup environment
|
||||
hack/e2e-setup.sh
|
||||
# run inventory source
|
||||
ansible-inventory -i examples/inventory.kubevirt.yml
|
||||
# create a virtual machine
|
||||
ansible-playbook -i examples/inventory.kubevirt.yml examples/play-create-min.yml
|
||||
# terminate a virtual machine
|
||||
ansible-playbook -i examples/inventory.kubevirt.yml examples/play-delete.yml
|
||||
# terminate the environment
|
||||
hack/e2e-setup.sh --cleanup
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user