82 Commits

Author SHA1 Message Date
kubevirt-bot
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
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
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
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
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
Felix Matouschek
660c75eae3 chore: Vendor kubernetes.core doc_fragments
Vendor the kubernetes.core doc_fragments used by this collection because
it is not possible to refer to doc_fragments of dependency collections.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-11 13:41:01 +01:00
Felix Matouschek
48734484f9 chore: Bump dependency on kubernetes.core
Bump the dependency on kubernetes.core to versions >=3.0.1 and remove
the workaround introduced by 4429ac8c03.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-03-04 16:01:26 +01:00
kubevirt-bot
c9a7b6a818 Merge pull request #43 from 0xFelix/update-requirements
cleanup: Update requirements throughout the project
2024-02-29 15:56:57 +01:00
kubevirt-bot
dc8d38433b Merge pull request #42 from 0xFelix/update-readme
chore: Update README.md
2024-02-29 15:54:57 +01:00
Felix Matouschek
44e1c0a719 cleanup: Update requirements throughout the project
Update the requirements throughout the project to be in sync and to
reflect the current state of dependencies.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-29 14:03:19 +01:00
Felix Matouschek
e0cde14f30 cleanup: Remove __resource_field_to_dict workaround from inventory
Since the minimum required version of the kubernetes python client was
updated to a version not requiring this workaround anymore, the
workaround is replaced with the to_dict() method found in the new
client.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-29 13:56:33 +01:00
Felix Matouschek
65f7c27487 chore: Update README.md
Update README.md to include all modules of the collection and keep
module descriptions in sync.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-29 13:32:37 +01:00
kubevirt-bot
4429ac8c03 Merge pull request #39 from 0xFelix/bump-version-e2e
Bump e2e-setup.sh version and ensure compatibility with KubeVirt >=1.1.0
2024-02-29 13:08:57 +01:00
Felix Matouschek
77ece9d466 ci: Add yamllint to CI linter job
This adds yamllint to the CI linter job and sets the maximum line
length to 140 like in kubevirt/kubevirt.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-29 11:41:49 +01:00
Felix Matouschek
44fce1cc31 fix: Ensure compatibility with KubeVirt >=1.1.0
Ensure compatibility with KubeVirt >=1.1.0 by monkey patching
kubernetes.core to handle apis of the format a/b/c and requiring
kubernetes>=28.1.0.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-29 11:21:17 +01:00
Felix Matouschek
6ee5a9c7c9 ansible-lint: Groom the .ansible-lint file
- Enable production profile
- Remove excludes no longer necessary
- Try to not skip any tests

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-26 16:31:56 +01:00
Guido Grazioli
8f8e7eda6e update sanity/unit tests matrix
Signed-off-by: Guido Grazioli <ggraziol@redhat.com>
2023-11-14 11:58:06 +01:00
Guido Grazioli
91e2a27987 update minimum ansible-core to 2.14+
linter

Signed-off-by: Guido Grazioli <ggraziol@redhat.com>
2023-11-14 11:42:08 +01:00
kubevirt-bot
d1318db8db Merge pull request #24 from 0xFelix/info_module
kubevirt_vm_info: Add info module for VirtualMachines
2023-09-07 15:57:28 +02:00
Felix Matouschek
6486766b11 kubevirt_vm_info: Add info module for VirtualMachines
This adds the kubevirt_vm_info module, which returns the same results as
the kubevirt_vm module, but is limited to read-only functionality.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-09-06 13:04:07 +02:00
Felix Matouschek
e33b479326 inventory: Add create_groups option
This adds the create_groups option to the inventory, which allows to
control the creation of groups from labels on VirtualMachines. By
default it is disabled.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-09-05 15:56:46 +02:00
Felix Matouschek
100bcee082 inventory: Flatten created groups
Drop creation of the namespace_vmis_group as it is redundant.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-09-05 15:53:22 +02:00
Felix Matouschek
38c76a9545 Rename collection to kubevirt.core
This replaces all occurences of the old kubernetes.core name.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-08-03 13:03:10 +02:00
Felix Matouschek
0875abc080 kubevirt_vm: Prevent unnecessary whitespace
This removes the unnecessary whitespace from the rendered VirtualMachine
template and adds a unit test for it.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-18 16:08:01 +02:00
Felix Matouschek
bce4f17188 kubevirt_vm: Allow to specify DataVolume templates
By allowing to specify DataVolume templates VMs with persistent storage
can be created using the kubevirt_vm module.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-18 13:40:52 +02:00
Felix Matouschek
6ba62f53e8 kubevirt_vm: Allow to specify template spec
By allowing to specify the template spec unnecessary abstraction is
avoided.

The following module args are replaced by the 'spec' arg:
  - termination_grace_period
  - interfaces
  - networks
  - volumes

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-18 11:31:32 +02:00
Felix Matouschek
b0971aca37 kubevirt_vm: Use {Instancetype,Preference}Matchers
Use InstancetypeMatchers and PreferenceMatchers directly instead of
providing multiple arguments to prevent unnecessary abstraction.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-18 10:41:15 +02:00
Felix Matouschek
9bc8d20ea6 inventory: Provide dummy classes to satisfy Ansible sanity
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-17 15:01:36 +02:00
Felix Matouschek
e1499d4aae Use correct author syntax
This updates the author syntax to satisfy the linter.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-17 14:12:14 +02:00
Felix Matouschek
7c347174ab Change LICENSE to GPLv3
Ansible collections are required to be licensed under the GPLv3.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-17 14:09:18 +02:00
Felix Matouschek
216df38df9 first commit
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2023-07-14 10:30:20 +02:00