Commit Graph
227 Commits
Author SHA1 Message Date
Felix Matouschek a3abcbedd4 feat: Set ansible_connection to winrm for Windows hosts
This changes the inventory plugin so that it sets the ansible_connection
to winrm if it detected a Windows host. If it did not detect a Windows
host the ansible_connection is no longer set, so Ansible falls back to
its default value of ssh. The detection of SSH services for hosts using
winrm is disabled.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-16 16:38:54 +02:00
Felix Matouschek 7c5de4adf9 cleanup: Run make format
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-16 16:38:54 +02:00
kubevirt-botandGitHub 6cb279e3d1 Merge pull request #79 from 0xFelix/unit-pytest
Migrate existing unit tests to pytest and add basic unit tests for inventory plugin
2024-04-16 16:38:36 +02:00
Felix Matouschek 5ae19f9623 tests: Add basic unit tests for inventory plugin
Add a test file for the inventory plugin with some basic unit tests.
This file can be used to add more tests in the future.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-16 15:16:37 +02:00
Felix Matouschek 1947fe9ca8 cleanup: Reorganize unit tests
Reorganize unit tests so the directory structure looks like the
structure used in most other collections.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-15 13:58:08 +02:00
Felix Matouschek 9848f66036 cleanup: Migrate existing unit tests to pytest
Cleanup the existing unit tests and move them to pytest. By using pytest
it becomes easier to add new tests for existing functionality in the
collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-15 13:58:08 +02:00
kubevirt-botandGitHub afb8d178c2 Merge pull request #78 from 0xFelix/vscode-venv
Add helper to build virtualenv and vscode configuration
2024-04-15 12:19:59 +02:00
Felix Matouschek ac589abf5e chore: Add vscode configuration
Add vscode configuration that allows to develop, test and debug the
collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-12 10:29:58 +02:00
Felix Matouschek 55a6acef5d chore: Add tox-ansible configuration
Add tox-ansible configuration that allows to run tests with all
required ansible and python versions. Add Makefile targets to make use
of it.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-12 10:29:54 +02:00
Felix Matouschek e2d2da2670 chore: Add tox configuration
Add tox configuration that allows to build a venv for development and to
format source files. To make use of it add appropriate Makefile targets.

Drop unneeded requirements from requirements.txt and
test-requirements.txt and add needed requirements.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-12 10:23:38 +02:00
kubevirt-botandGitHub b392d8077d Merge pull request #77 from l3acon/add-composite-vars
fix: add composite vars to inventory
2024-04-09 17:23:56 +02:00
matt c058de50cd fix: add composite vars to inventory
Docs seem to indicate compose variables should work, but they aren't actually set.
Fix that by adding the composite variables to the inventory.

Signed-off-by: matt <l3acon@gmail.com>
2024-04-09 08:53:51 -06:00
kubevirt-botandGitHub 64a3136fde Merge pull request #76 from 0xFelix/service-network
feat: Give secondary interfaces a higher priority over services
2024-04-09 10:49:54 +02:00
Felix Matouschek 7dc7312a8b feat: Give secondary interfaces a higher priority over services
To give secondary interfaces a higher priority over services the use of
services is disabled if a network_name was provided.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-05 14:35:44 +02:00
kubevirt-botandGitHub 95d07ce57b Merge pull request #74 from 0xFelix/e2e-registry
tests: Add --create-registry to hack/e2e-setup.sh
2024-04-05 10:04:40 +02:00
kubevirt-botandGitHub fd9fa2f3a3 Merge pull request #73 from 0xFelix/avoid-empty-groups
fix: Return early to avoid adding empty groups.
2024-04-05 10:00:40 +02:00
Felix Matouschek 61d631de9a tests: Add --create-registry to hack/e2e-setup.sh
With this change hack/e2e-setup.sh configures a local registry when the
--create-registry argument is passed to it. This registry can be used to
test local images. The registry is optional and not created by default.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-05 09:51:05 +02:00
Felix Matouschek 3560818167 fix: Return early to avoid adding empty groups.
If no VMIs were found in a namespace then return early to avoid adding
empty groups.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-05 09:44:38 +02:00
kubevirt-botandGitHub 34c0279690 Merge pull request #72 from 0xFelix/append_base_domain
feat: Add append_base_domain option to connections
2024-04-05 09:00:40 +02:00
Felix Matouschek ae17f5cc57 feat: Add append_base_domain option to connections
This option allows to append the base domain of a cluster to host names
constructed from SSH services of type NodePort. Also add the missing
documentation for option base_domain.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-03 16:34:07 +02:00
kubevirt-botandGitHub ecb285764a Merge pull request #71 from 0xFelix/update-changelog
chore: Update CHANGELOG.rst
2024-04-03 16:06:36 +02:00
kubevirt-botandGitHub 2f0344ebe1 Merge pull request #70 from 0xFelix/explicit-ssh-port
fix: Explicity set ansible_port
2024-04-03 16:02:37 +02:00
Felix Matouschek b7009ede7d chore: Update CHANGELOG.rst
Update CHANGELOG.rst to conform to semantic versioning of the
collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-03 15:52:51 +02:00
Felix Matouschek 9f33a3059c fix: Explicity set ansible_port
Explicitly set ansible_port so it is reset in AWX inventories if the
value changes from set to unset.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-03 15:39:42 +02:00
kubevirt-botandGitHub 7a6bd72943 Merge pull request #68 from 0xFelix/ansible-inclusion
Fixes for Ansible inclusion
2024-03-21 16:45:17 +01:00
Felix Matouschek a020730ba7 cleanup: Correct changelog
Move the introduction of kubevirt_vm_info from major to minor since it
did not break API compatibility or compatibility with existing playbooks.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-21 16:22:48 +01:00
Felix Matouschek db874e61bc cleanup: Add reference to release policy to README.md
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-21 16:21:28 +01:00
kubevirt-botandGitHub ebc151cda7 Merge pull request #67 from 0xFelix/rework-gitignore
chore: Rework gitignore
2024-03-20 10:29:15 +01:00
Felix Matouschek 1772f182e0 chore: Rework gitignore
Rework gitignore by combining all gitignore files and adding files
generated by running tests.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-20 10:19:13 +01:00
kubevirt-botandGitHub 7e7197ad8a Merge pull request #66 from 0xFelix/fix-test-config
fix: Rename tests/config.yaml to tests/config.yml
2024-03-20 09:37:15 +01:00
Felix Matouschek 651e1d6718 fix: Rename tests/config.yaml to tests/config.yml
The file extension of the file needs to be .yml, so ansible-test is able
to pick it up.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-20 09:19:28 +01:00
kubevirt-botandGitHub 5ee2b98183 Merge pull request #65 from 0xFelix/gitignore
galaxy.yml: Add .gitignores to build_ignore
2024-03-19 18:33:16 +01:00
Felix Matouschek 426b9ce2f2 galaxy.yml: Add .gitignores to build_ignore
Add .gitignore files to build_ignore since we do not need them in the
released collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-19 17:52:37 +01:00
kubevirt-bot b910cc6679 Update changelog for release 1.2.3
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.2.3
2024-03-18 16:27:25 +00:00
kubevirt-botandGitHub bb6a8766a7 Merge pull request #62 from 0xFelix/bump-ver
chore: Bump version to 1.2.3
2024-03-18 17:25:14 +01:00
Felix MatouschekandGitHub 6c4e65005c Merge pull request #64 from 0xFelix/fix-cleanup-names
chore: Fix names in inventory cleanup

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-18 17:23:40 +01:00
Felix Matouschek 41751fe432 chore: Fix names in inventory cleanup
We are deleting VMs, not creating VMs. Therefore change the names to
reflect that.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-18 17:21:52 +01:00
kubevirt-botandGitHub 21c2bacbb4 Merge pull request #63 from 0xFelix/inventory-test-cleanup
tests: Cleanup after inventory test
2024-03-18 17:19:14 +01:00
Felix Matouschek eb2291692d tests: Cleanup after inventory test
Cleanup the created the created VMs after the inventory integration
tests collected the inventory test results to not leave running VMs
behind after the test finished.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-18 17:00:53 +01:00
Felix Matouschek 09ef2be0fd chore: Bump version to 1.2.3
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-18 16:51:30 +01:00
kubevirt-bot bbe86b89ba Update changelog for release 1.2.2
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.2.2
2024-03-11 15:13:08 +00:00
kubevirt-botandGitHub 3f08bba36b Merge pull request #58 from 0xFelix/bump-version-3
chore: Bump version to 1.2.2
2024-03-11 16:03:16 +01:00
kubevirt-botandGitHub 5125f5365d Merge pull request #61 from 0xFelix/misc
Doc updates
2024-03-11 15:59:16 +01:00
Felix Matouschek 232d802080 chore: Update requires_ansible placeholder in README.md
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-11 15:41:04 +01:00
Felix Matouschek 2a6255233e docs: Update inventory matches on string
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-11 15:14:12 +01:00
Felix Matouschek 9bc46c4017 docs: Update links to KubeVirt API reference
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-11 15:07:22 +01:00
kubevirt-botandGitHub baf8fc0d8b Merge pull request #60 from 0xFelix/update-ignore
galaxy.yaml: Update build_ignore again
2024-03-11 15:07:20 +01:00
kubevirt-botandGitHub b33a9d18ba Merge pull request #59 from 0xFelix/update-readme-3
docs: Update link to kubernetes.core collection in README.md
2024-03-11 15:05:16 +01:00
kubevirt-botandGitHub e56ec630e0 Merge pull request #57 from 0xFelix/vendor-doc-fragments
chore: Vendor kubernetes.core doc_fragments
2024-03-11 14:43:15 +01:00
Felix Matouschek 939758a057 galaxy.yaml: Update build_ignore again
Remove CONTRIBUTING.md from build_ignore and add docs/requirements.txt
to build_ignore.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-11 14:41:02 +01:00