Update docs for main

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
This commit is contained in:
kubevirt-bot
2024-04-17 10:25:21 +00:00
parent c1111143a0
commit 71eddae079
23 changed files with 388 additions and 140 deletions

View File

@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6e81de691863fbf05fa0e7dc16e0ad62
config: 784e339049cf373d4151ac7b6d923393
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -55,39 +55,39 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#v1-3-0">v1.3.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#release-summary">Release Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="#minor-changes">Minor Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#bugfixes">Bugfixes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#v1-2-3">v1.2.3</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id6">Release Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="#release-summary">Release Summary</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#v1-2-2">v1.2.2</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id7">Release Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id6">Release Summary</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#v1-2-1">v1.2.1</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id8">Release Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id7">Release Summary</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#v1-2-0">v1.2.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id9">Release Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id8">Release Summary</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#v1-1-0">v1.1.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id10">Minor Changes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id9">Minor Changes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#v1-0-0">v1.0.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id11">Release Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id10">Release Summary</a></li>
</ul>
</li>
</ul>
@@ -119,47 +119,46 @@
<div itemprop="articleBody">
<section id="kubevirt-collection-for-ansible-release-notes">
<h1><a class="toc-backref" href="#id12" role="doc-backlink">KubeVirt Collection for Ansible Release Notes</a><a class="headerlink" href="#kubevirt-collection-for-ansible-release-notes" title="Link to this heading"></a></h1>
<h1><a class="toc-backref" href="#id11" role="doc-backlink">KubeVirt Collection for Ansible Release Notes</a><a class="headerlink" href="#kubevirt-collection-for-ansible-release-notes" title="Link to this heading"></a></h1>
<nav class="contents" id="topics">
<p class="topic-title">Topics</p>
<ul class="simple">
<li><p><a class="reference internal" href="#kubevirt-collection-for-ansible-release-notes" id="id12">KubeVirt Collection for Ansible Release Notes</a></p>
<li><p><a class="reference internal" href="#kubevirt-collection-for-ansible-release-notes" id="id11">KubeVirt Collection for Ansible Release Notes</a></p>
<ul>
<li><p><a class="reference internal" href="#v1-3-0" id="id13">v1.3.0</a></p>
<li><p><a class="reference internal" href="#v1-3-0" id="id12">v1.3.0</a></p>
<ul>
<li><p><a class="reference internal" href="#release-summary" id="id14">Release Summary</a></p></li>
<li><p><a class="reference internal" href="#minor-changes" id="id15">Minor Changes</a></p></li>
<li><p><a class="reference internal" href="#bugfixes" id="id16">Bugfixes</a></p></li>
<li><p><a class="reference internal" href="#minor-changes" id="id13">Minor Changes</a></p></li>
<li><p><a class="reference internal" href="#bugfixes" id="id14">Bugfixes</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-2-3" id="id17">v1.2.3</a></p>
<li><p><a class="reference internal" href="#v1-2-3" id="id15">v1.2.3</a></p>
<ul>
<li><p><a class="reference internal" href="#release-summary" id="id16">Release Summary</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-2-2" id="id17">v1.2.2</a></p>
<ul>
<li><p><a class="reference internal" href="#id6" id="id18">Release Summary</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-2-2" id="id19">v1.2.2</a></p>
<li><p><a class="reference internal" href="#v1-2-1" id="id19">v1.2.1</a></p>
<ul>
<li><p><a class="reference internal" href="#id7" id="id20">Release Summary</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-2-1" id="id21">v1.2.1</a></p>
<li><p><a class="reference internal" href="#v1-2-0" id="id21">v1.2.0</a></p>
<ul>
<li><p><a class="reference internal" href="#id8" id="id22">Release Summary</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-2-0" id="id23">v1.2.0</a></p>
<li><p><a class="reference internal" href="#v1-1-0" id="id23">v1.1.0</a></p>
<ul>
<li><p><a class="reference internal" href="#id9" id="id24">Release Summary</a></p></li>
<li><p><a class="reference internal" href="#id9" id="id24">Minor Changes</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-1-0" id="id25">v1.1.0</a></p>
<li><p><a class="reference internal" href="#v1-0-0" id="id25">v1.0.0</a></p>
<ul>
<li><p><a class="reference internal" href="#id10" id="id26">Minor Changes</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#v1-0-0" id="id27">v1.0.0</a></p>
<ul>
<li><p><a class="reference internal" href="#id11" id="id28">Release Summary</a></p></li>
<li><p><a class="reference internal" href="#id10" id="id26">Release Summary</a></p></li>
</ul>
</li>
</ul>
@@ -168,20 +167,16 @@
</nav>
<p>This changelog describes changes after version 1.0.0.</p>
<section id="v1-3-0">
<h2><a class="toc-backref" href="#id13" role="doc-backlink">v1.3.0</a><a class="headerlink" href="#v1-3-0" title="Link to this heading"></a></h2>
<section id="release-summary">
<h3><a class="toc-backref" href="#id14" role="doc-backlink">Release Summary</a><a class="headerlink" href="#release-summary" title="Link to this heading"></a></h3>
<p>Internal release, documentation or test changes only.</p>
</section>
<h2><a class="toc-backref" href="#id12" role="doc-backlink">v1.3.0</a><a class="headerlink" href="#v1-3-0" title="Link to this heading"></a></h2>
<section id="minor-changes">
<h3><a class="toc-backref" href="#id15" role="doc-backlink">Minor Changes</a><a class="headerlink" href="#minor-changes" title="Link to this heading"></a></h3>
<h3><a class="toc-backref" href="#id13" role="doc-backlink">Minor Changes</a><a class="headerlink" href="#minor-changes" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>feat: Add append_base_domain option to connections <a class="reference external" href="https://github.com/kubevirt/kubevirt.core/pull/72">#72</a></p></li>
<li><p>feat: Give secondary interfaces a higher priority over services <a class="reference external" href="https://github.com/kubevirt/kubevirt.core/pull/76">#76</a></p></li>
</ul>
</section>
<section id="bugfixes">
<h3><a class="toc-backref" href="#id16" role="doc-backlink">Bugfixes</a><a class="headerlink" href="#bugfixes" title="Link to this heading"></a></h3>
<h3><a class="toc-backref" href="#id14" role="doc-backlink">Bugfixes</a><a class="headerlink" href="#bugfixes" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>feat: Set ansible_connection to winrm for Windows hosts <a class="reference external" href="https://github.com/kubevirt/kubevirt.core/pull/75">#75</a></p></li>
<li><p>fix: Explicity set ansible_port <a class="reference external" href="https://github.com/kubevirt/kubevirt.core/pull/70">#70</a></p></li>
@@ -190,37 +185,37 @@
</section>
</section>
<section id="v1-2-3">
<h2><a class="toc-backref" href="#id17" role="doc-backlink">v1.2.3</a><a class="headerlink" href="#v1-2-3" title="Link to this heading"></a></h2>
<section id="id6">
<h3><a class="toc-backref" href="#id18" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id6" title="Link to this heading"></a></h3>
<h2><a class="toc-backref" href="#id15" role="doc-backlink">v1.2.3</a><a class="headerlink" href="#v1-2-3" title="Link to this heading"></a></h2>
<section id="release-summary">
<h3><a class="toc-backref" href="#id16" role="doc-backlink">Release Summary</a><a class="headerlink" href="#release-summary" title="Link to this heading"></a></h3>
<p>No functional changes, hotfix release to retrigger the downstream build and to keep in sync with Ansible Automation Hub.</p>
</section>
</section>
<section id="v1-2-2">
<h2><a class="toc-backref" href="#id19" role="doc-backlink">v1.2.2</a><a class="headerlink" href="#v1-2-2" title="Link to this heading"></a></h2>
<section id="id7">
<h3><a class="toc-backref" href="#id20" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id7" title="Link to this heading"></a></h3>
<h2><a class="toc-backref" href="#id17" role="doc-backlink">v1.2.2</a><a class="headerlink" href="#v1-2-2" title="Link to this heading"></a></h2>
<section id="id6">
<h3><a class="toc-backref" href="#id18" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id6" title="Link to this heading"></a></h3>
<p>No functional changes, only cleanup of files included in the release tarball and vendoring of documentation fragments.</p>
</section>
</section>
<section id="v1-2-1">
<h2><a class="toc-backref" href="#id21" role="doc-backlink">v1.2.1</a><a class="headerlink" href="#v1-2-1" title="Link to this heading"></a></h2>
<section id="id8">
<h3><a class="toc-backref" href="#id22" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id8" title="Link to this heading"></a></h3>
<h2><a class="toc-backref" href="#id19" role="doc-backlink">v1.2.1</a><a class="headerlink" href="#v1-2-1" title="Link to this heading"></a></h2>
<section id="id7">
<h3><a class="toc-backref" href="#id20" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id7" title="Link to this heading"></a></h3>
<p>Mostly code cleanups and dependency updates to ensure compatibility with KubeVirt &gt;= 1.1.0</p>
</section>
</section>
<section id="v1-2-0">
<h2><a class="toc-backref" href="#id23" role="doc-backlink">v1.2.0</a><a class="headerlink" href="#v1-2-0" title="Link to this heading"></a></h2>
<section id="id9">
<h3><a class="toc-backref" href="#id24" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id9" title="Link to this heading"></a></h3>
<h2><a class="toc-backref" href="#id21" role="doc-backlink">v1.2.0</a><a class="headerlink" href="#v1-2-0" title="Link to this heading"></a></h2>
<section id="id8">
<h3><a class="toc-backref" href="#id22" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id8" title="Link to this heading"></a></h3>
<p>Not released due to issues in the release process</p>
</section>
</section>
<section id="v1-1-0">
<h2><a class="toc-backref" href="#id25" role="doc-backlink">v1.1.0</a><a class="headerlink" href="#v1-1-0" title="Link to this heading"></a></h2>
<section id="id10">
<h3><a class="toc-backref" href="#id26" role="doc-backlink">Minor Changes</a><a class="headerlink" href="#id10" title="Link to this heading"></a></h3>
<h2><a class="toc-backref" href="#id23" role="doc-backlink">v1.1.0</a><a class="headerlink" href="#v1-1-0" title="Link to this heading"></a></h2>
<section id="id9">
<h3><a class="toc-backref" href="#id24" role="doc-backlink">Minor Changes</a><a class="headerlink" href="#id9" title="Link to this heading"></a></h3>
<ul class="simple">
<li><p>Add kubevirt_vm_info module to describe existing VirtualMachines</p></li>
<li><p>inventory: Allow to control creation of additional groups</p></li>
@@ -229,9 +224,9 @@
</section>
</section>
<section id="v1-0-0">
<h2><a class="toc-backref" href="#id27" role="doc-backlink">v1.0.0</a><a class="headerlink" href="#v1-0-0" title="Link to this heading"></a></h2>
<section id="id11">
<h3><a class="toc-backref" href="#id28" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id11" title="Link to this heading"></a></h3>
<h2><a class="toc-backref" href="#id25" role="doc-backlink">v1.0.0</a><a class="headerlink" href="#v1-0-0" title="Link to this heading"></a></h2>
<section id="id10">
<h3><a class="toc-backref" href="#id26" role="doc-backlink">Release Summary</a><a class="headerlink" href="#id10" title="Link to this heading"></a></h3>
<p>Initial release</p>
</section>
</section>

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -54,6 +54,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -79,6 +79,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -9,11 +9,6 @@ This changelog describes changes after version 1.0.0.
v1.3.0
======
Release Summary
---------------
Internal release, documentation or test changes only.
Minor Changes
-------------

View File

@@ -11,3 +11,24 @@
- `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`).

View File

@@ -1,9 +1,88 @@
# Testing
## Continuous integration
## Sanity and unit tests
The `hack/e2e-setup.sh` script contains the steps necessary to reproduce the CI test environment, which relies on `kubectl` and `kind`.
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

View File

@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View File

@@ -4,7 +4,7 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View File

@@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -13,7 +13,7 @@
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
/* Non-minified version is copied as a separate JS file, is available */
/* Non-minified version is copied as a separate JS file, if available */
/**
* Porter Stemmer

View File

@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
.then((data) => {
if (data)
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
Search.makeSearchSummary(data, searchTerms, anchor)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
@@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => {
);
else
Search.status.innerText = _(
`Search finished, found ${resultCount} page(s) matching the search query.`
);
"Search finished, found ${resultCount} page(s) matching the search query."
).replace('${resultCount}', resultCount);
};
const _displayNextItem = (
results,
@@ -137,6 +137,22 @@ const _displayNextItem = (
// search finished, update title and status message
else _finishSearch(resultCount);
};
// Helper function used by query() to order search results.
// Each input is an array of [docname, title, anchor, descr, score, filename].
// Order the results by score (in opposite order of appearance, since the
// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
const _orderResultsByScoreThenName = (a, b) => {
const leftScore = a[4];
const rightScore = b[4];
if (leftScore === rightScore) {
// same score: sort alphabetically
const leftTitle = a[1].toLowerCase();
const rightTitle = b[1].toLowerCase();
if (leftTitle === rightTitle) return 0;
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
}
return leftScore > rightScore ? 1 : -1;
};
/**
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
@@ -160,13 +176,26 @@ const Search = {
_queued_query: null,
_pulse_status: -1,
htmlToText: (htmlString) => {
htmlToText: (htmlString, anchor) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
for (const removalQuery of [".headerlinks", "script", "style"]) {
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
}
if (anchor) {
const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`);
if (anchorContent) return anchorContent.textContent;
console.warn(
`Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`
);
}
// if anchor not specified or not found, fall back to main content
const docContent = htmlElement.querySelector('[role="main"]');
if (docContent !== undefined) return docContent.textContent;
if (docContent) return docContent.textContent;
console.warn(
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
"Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template."
);
return "";
},
@@ -239,16 +268,7 @@ const Search = {
else Search.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query: (query) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const titles = Search._index.titles;
const allTitles = Search._index.alltitles;
const indexEntries = Search._index.indexentries;
_parseQuery: (query) => {
// stem the search terms and add them to the correct list
const stemmer = new Stemmer();
const searchTerms = new Set();
@@ -284,16 +304,32 @@ const Search = {
// console.info("required: ", [...searchTerms]);
// console.info("excluded: ", [...excludedTerms]);
// array of [docname, title, anchor, descr, score, filename]
let results = [];
return [query, searchTerms, excludedTerms, highlightTerms, objectTerms];
},
/**
* execute search (requires search index to be loaded)
*/
_performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const titles = Search._index.titles;
const allTitles = Search._index.alltitles;
const indexEntries = Search._index.indexentries;
// Collect multiple result groups to be sorted separately and then ordered.
// Each is an array of [docname, title, anchor, descr, score, filename].
const normalResults = [];
const nonMainIndexResults = [];
_removeChildren(document.getElementById("search-progress"));
const queryLower = query.toLowerCase();
const queryLower = query.toLowerCase().trim();
for (const [title, foundTitles] of Object.entries(allTitles)) {
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
for (const [file, id] of foundTitles) {
let score = Math.round(100 * queryLower.length / title.length)
results.push([
normalResults.push([
docNames[file],
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
@@ -308,46 +344,47 @@ const Search = {
// search for explicit entries in index directives
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
for (const [file, id] of foundEntries) {
let score = Math.round(100 * queryLower.length / entry.length)
results.push([
for (const [file, id, isMain] of foundEntries) {
const score = Math.round(100 * queryLower.length / entry.length);
const result = [
docNames[file],
titles[file],
id ? "#" + id : "",
null,
score,
filenames[file],
]);
];
if (isMain) {
normalResults.push(result);
} else {
nonMainIndexResults.push(result);
}
}
}
}
// lookup as object
objectTerms.forEach((term) =>
results.push(...Search.performObjectSearch(term, objectTerms))
normalResults.push(...Search.performObjectSearch(term, objectTerms))
);
// lookup as search terms in fulltext
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
if (Scorer.score) {
normalResults.forEach((item) => (item[4] = Scorer.score(item)));
nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item)));
}
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort((a, b) => {
const leftScore = a[4];
const rightScore = b[4];
if (leftScore === rightScore) {
// same score: sort alphabetically
const leftTitle = a[1].toLowerCase();
const rightTitle = b[1].toLowerCase();
if (leftTitle === rightTitle) return 0;
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
}
return leftScore > rightScore ? 1 : -1;
});
// Sort each group of results by score and then alphabetically by name.
normalResults.sort(_orderResultsByScoreThenName);
nonMainIndexResults.sort(_orderResultsByScoreThenName);
// Combine the result groups in (reverse) order.
// Non-main index entries are typically arbitrary cross-references,
// so display them after other results.
let results = [...nonMainIndexResults, ...normalResults];
// remove duplicate search results
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
@@ -361,7 +398,12 @@ const Search = {
return acc;
}, []);
results = results.reverse();
return results.reverse();
},
query: (query) => {
const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query);
const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms);
// for debugging
//Search.lastresults = results.slice(); // a copy
@@ -466,14 +508,18 @@ const Search = {
// add support for partial matches
if (word.length > 2) {
const escapedWord = _escapeRegExp(word);
Object.keys(terms).forEach((term) => {
if (term.match(escapedWord) && !terms[word])
arr.push({ files: terms[term], score: Scorer.partialTerm });
});
Object.keys(titleTerms).forEach((term) => {
if (term.match(escapedWord) && !titleTerms[word])
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
});
if (!terms.hasOwnProperty(word)) {
Object.keys(terms).forEach((term) => {
if (term.match(escapedWord))
arr.push({ files: terms[term], score: Scorer.partialTerm });
});
}
if (!titleTerms.hasOwnProperty(word)) {
Object.keys(titleTerms).forEach((term) => {
if (term.match(escapedWord))
arr.push({ files: titleTerms[term], score: Scorer.partialTitle });
});
}
}
// no match but word was a required one
@@ -496,9 +542,8 @@ const Search = {
// create the mapping
files.forEach((file) => {
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
fileMap.get(file).push(word);
else fileMap.set(file, [word]);
if (!fileMap.has(file)) fileMap.set(file, [word]);
else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word);
});
});
@@ -549,8 +594,8 @@ const Search = {
* search summary for a given text. keywords is a list
* of stemmed words.
*/
makeSearchSummary: (htmlText, keywords) => {
const text = Search.htmlToText(htmlText);
makeSearchSummary: (htmlText, keywords, anchor) => {
const text = Search.htmlToText(htmlText, anchor);
if (text === "") return null;
const textLower = text.toLowerCase();

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -56,6 +56,10 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="#development-environment">Development environment</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#virtualenv-for-development">Virtualenv for development</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>
@@ -102,6 +106,24 @@
<li><p>All arguments have a specification in <code class="docutils literal notranslate"><span class="pre">meta/argument_specs.yml</span></code></p></li>
<li><p>All playbooks/roles should be focused on compatibility with Ansible Automation Platform</p></li>
</ul>
</section>
<section id="development-environment">
<h1>Development environment<a class="headerlink" href="#development-environment" title="Link to this heading"></a></h1>
<p>To develop and to run tests you need to install <code class="docutils literal notranslate"><span class="pre">tox</span></code> and <code class="docutils literal notranslate"><span class="pre">tox-ansible</span></code> on
your machine.</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">pip install --user tox tox-ansible</span>
</pre></div>
</div>
<section id="virtualenv-for-development">
<h2>Virtualenv for development<a class="headerlink" href="#virtualenv-for-development" title="Link to this heading"></a></h2>
<p>To build a virtualenv for development purposes run the following command:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">make build-venv</span>
</pre></div>
</div>
<p>The resulting virtualenv will be symlinked to <code class="docutils literal notranslate"><span class="pre">.venv</span></code>, which for example can
be selected as virtualenv in VSCode (<code class="docutils literal notranslate"><span class="pre">Shift+Ctrl+P</span></code> and then
<code class="docutils literal notranslate"><span class="pre">Python:</span> <span class="pre">Select</span> <span class="pre">Interpreter</span></code>).</p>
</section>
</section>

View File

@@ -17,7 +17,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="#" />
@@ -53,6 +53,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -55,6 +55,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>
@@ -118,11 +119,16 @@
<p class="caption" role="heading"><span class="caption-text">Developer documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="testing.html#continuous-integration">Continuous integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing.html#sanity-and-unit-tests">Sanity and unit tests</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing.html#integration-tests">Integration tests</a></li>
<li class="toctree-l2"><a class="reference internal" href="testing.html#example-config-and-playbooks">Example config and playbooks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a><ul>
<li class="toctree-l2"><a class="reference internal" href="developing.html#virtualenv-for-development">Virtualenv for development</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a><ul>
<li class="toctree-l2"><a class="reference internal" href="releasing.html#new-content-is-added-to-an-existing-collection">New content is added to an existing collection</a></li>
<li class="toctree-l2"><a class="reference internal" href="releasing.html#new-feature-to-existing-plugin-or-role-within-a-collection-backwards-compatible">New feature to existing plugin or role within a collection (backwards compatible)</a></li>

View File

@@ -18,7 +18,7 @@
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
@@ -61,6 +61,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -19,7 +19,7 @@
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
@@ -71,6 +71,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -19,7 +19,7 @@
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
@@ -73,6 +73,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -19,7 +19,7 @@
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
@@ -73,6 +73,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -56,6 +56,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Collection Versioning Strategy</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#new-content-is-added-to-an-existing-collection">New content is added to an existing collection</a></li>
<li class="toctree-l2"><a class="reference internal" href="#new-feature-to-existing-plugin-or-role-within-a-collection-backwards-compatible">New feature to existing plugin or role within a collection (backwards compatible)</a></li>

View File

@@ -18,7 +18,7 @@
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
@@ -58,6 +58,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
@@ -56,6 +56,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="testing.html">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>

File diff suppressed because one or more lines are too long

View File

@@ -18,7 +18,7 @@
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
@@ -55,11 +55,21 @@
<p class="caption" role="heading"><span class="caption-text">Developer documentation</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Testing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#continuous-integration">Continuous integration</a></li>
<li class="toctree-l2"><a class="reference internal" href="#sanity-and-unit-tests">Sanity and unit tests</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#running-tests-with-tox-ansible">Running tests with tox-ansible</a></li>
<li class="toctree-l3"><a class="reference internal" href="#running-tests-with-ansible-test">Running tests with ansible-test</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#integration-tests">Integration tests</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#continuous-integration">Continuous integration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#running-integration-tests-with-ansible-test">Running integration tests with ansible test</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#example-config-and-playbooks">Example config and playbooks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developing.html">Contributors Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="developing.html#development-environment">Development environment</a></li>
<li class="toctree-l1"><a class="reference internal" href="releasing.html">Collection Versioning Strategy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">General</span></p>
@@ -93,9 +103,74 @@
<section id="testing">
<h1>Testing<a class="headerlink" href="#testing" title="Link to this heading"></a></h1>
<section id="sanity-and-unit-tests">
<h2>Sanity and unit tests<a class="headerlink" href="#sanity-and-unit-tests" title="Link to this heading"></a></h2>
<p>Sanity and unit tests can be run in two ways:</p>
<ul class="simple">
<li><p>with <code class="docutils literal notranslate"><span class="pre">tox</span></code> and the <code class="docutils literal notranslate"><span class="pre">tox-ansible</span></code> plugin (both need to be installed on the dev machine)</p></li>
<li><p>with <code class="docutils literal notranslate"><span class="pre">ansible-test</span></code></p></li>
</ul>
<p>For development purposes <code class="docutils literal notranslate"><span class="pre">tox</span></code> and <code class="docutils literal notranslate"><span class="pre">tox-ansible</span></code> are better suited, as they allow
debugging of issues in the collection on the developers machine.</p>
<p>For verification purposes of the collection the compatibility with <code class="docutils literal notranslate"><span class="pre">ansible-test</span></code>
is ensured.</p>
<section id="running-tests-with-tox-ansible">
<h3>Running tests with tox-ansible<a class="headerlink" href="#running-tests-with-tox-ansible" title="Link to this heading"></a></h3>
<p>Run sanity tests with <code class="docutils literal notranslate"><span class="pre">tox-ansible</span></code> like so:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">make test-sanity</span>
</pre></div>
</div>
<p>Run unit tests with <code class="docutils literal notranslate"><span class="pre">tox-ansible</span></code> like so:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">make test-unit</span>
</pre></div>
</div>
</section>
<section id="running-tests-with-ansible-test">
<h3>Running tests with ansible-test<a class="headerlink" href="#running-tests-with-ansible-test" title="Link to this heading"></a></h3>
<p>In order to test changes with <code class="docutils literal notranslate"><span class="pre">ansible-test</span></code>, it is recommended to bind mount
the repository to <code class="docutils literal notranslate"><span class="pre">~/.ansible/collections/ansible_collections/kubevirt/core</span></code>
if you did not check it out into this location.</p>
<p>This can be done with:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">mkdir -p ~/.ansible/collections/ansible_collections/kubevirt/core</span>
<span class="l l-Scalar l-Scalar-Plain">sudo mount --bind &lt;project_dir&gt;/kubevirt.core ~/.ansible/collections/ansible_collections/kubevirt/core</span>
<span class="l l-Scalar l-Scalar-Plain">cd ~/.ansible/collections/ansible_collections/kubevirt/core</span>
</pre></div>
</div>
<p>Run sanity tests with <code class="docutils literal notranslate"><span class="pre">ansible-test</span></code> like so:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">ANSIBLE_TEST_PREFER_PODMAN=1 ansible-test sanity --docker</span>
</pre></div>
</div>
<p>Run unit tests with <code class="docutils literal notranslate"><span class="pre">ansible-test</span></code> like so:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">ANSIBLE_TEST_PREFER_PODMAN=1 ansible-test units --docker</span>
</pre></div>
</div>
</section>
</section>
<section id="integration-tests">
<h2>Integration tests<a class="headerlink" href="#integration-tests" title="Link to this heading"></a></h2>
<p>Integration tests require a working cluster and can be run with
<code class="docutils literal notranslate"><span class="pre">ansible-test</span></code>.</p>
<section id="continuous-integration">
<h2>Continuous integration<a class="headerlink" href="#continuous-integration" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">hack/e2e-setup.sh</span></code> script contains the steps necessary to reproduce the CI test environment, which relies on <code class="docutils literal notranslate"><span class="pre">kubectl</span></code> and <code class="docutils literal notranslate"><span class="pre">kind</span></code>.</p>
<h3>Continuous integration<a class="headerlink" href="#continuous-integration" title="Link to this heading"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">hack/e2e-setup.sh</span></code> script contains the steps necessary to reproduce the
CI integration test environment, which relies on <code class="docutils literal notranslate"><span class="pre">docker</span></code> or <code class="docutils literal notranslate"><span class="pre">podman</span></code>,
<code class="docutils literal notranslate"><span class="pre">kubectl</span></code> and <code class="docutils literal notranslate"><span class="pre">kind</span></code>.</p>
<p>To create the CI integration test environment on your machine run:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">make cluster-up</span>
</pre></div>
</div>
<p>To remove the test CI integration test environment run:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">make cluster-down</span>
</pre></div>
</div>
</section>
<section id="running-integration-tests-with-ansible-test">
<h3>Running integration tests with ansible test<a class="headerlink" href="#running-integration-tests-with-ansible-test" title="Link to this heading"></a></h3>
<p>Run integration tests with ansible-test like so:</p>
<div class="highlight-YAML+Jinja notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">ansible-test integration</span>
</pre></div>
</div>
</section>
</section>
<section id="example-config-and-playbooks">
<h2>Example config and playbooks<a class="headerlink" href="#example-config-and-playbooks" title="Link to this heading"></a></h2>