1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] ad5482f63d
Add proxmox_nic module (#2449) (#2502)
* Add proxmox_nic module

Add proxmox_nic module to manage NIC's on Qemu(KVM) VM's in a Proxmox VE
cluster.
Update proxmox integration tests and add tests for proxmox_nic module.

This partially solves https://github.com/ansible-collections/community.general/issues/1964#issuecomment-790499397
and allows for adding/updating/deleting network interface cards after
creating/cloning a VM.

The proxmox_nic module will keep MAC-addresses the same when updating a
NIC. It only changes when explicitly setting a MAC-address.

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add check_mode and implement review comments

- check_mode added
- some documentation updates
- when MTU is set, check if the model is virtio, else fail
- trunks can now be provided as list of ints instead of vlanid[;vlanid...]

* Make returns on update_nic and delete_nic more readable

Co-authored-by: Felix Fontein <felix@fontein.de>

* Increase readability on update_nic and delete_nic

* Implement check in get_vmid

- get_vmid will now fail when multiple vmid's are returned as proxmox
  doesn't guarantee uniqueness
- remove an unused import
- fix a typo in an error message

* Add some error checking to get_vmid

- get_vmid will now return the error message when proxmoxer fails
- get_vmid will return the vmid directly instead of a list of one
- Some minor documentation updates

* Warn instead of fail when setting mtu on unsupported nic

- When setting the MTU on an unsupported NIC model (virtio is the only
  supported model) this module will now print a warning instead of
  failing.
- Some minor documentation updates.

* Take advantage of proxmox_auth_argument_spec

Make use of proxmox_auth_argument_spec from plugins/module_utils/proxmox.py
This provides some extra environment fallbacks.

* Add blank line to conform with pep8

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 23dda56913)

Co-authored-by: Kogelvis <github@ar-ix.net>
2021-05-14 09:47:39 +02:00
..
action Bump version to 2.0.0 (#1369) 2020-11-26 14:26:36 +01:00
become Make plugins pass validation. (#2414) (#2431) 2021-05-03 13:51:10 +02:00
cache fixed Python 3 keys() usage (#1861) 2021-02-23 23:19:27 +01:00
callback Make plugins pass validation. (#2414) (#2431) 2021-05-03 13:51:10 +02:00
connection funcd connection plugin is now usable/loadable (#2235) 2021-04-14 09:25:57 +02:00
doc_fragments Allow keycloak modules to take token as parameter for the auth. (#2250) 2021-04-20 13:20:46 +02:00
filter New filter plugins: hashids_encode and hashids_decode (#2244) 2021-04-17 20:00:03 +02:00
inventory fix stackpath_compute validate_config (#2448) (#2475) 2021-05-09 22:46:17 +02:00
lookup Add dependent lookup plugin (#2164) (#2490) 2021-05-11 20:14:30 +02:00
module_utils module_helper.py Breakdown (#2393) (#2492) 2021-05-11 20:05:42 +02:00
modules Add proxmox_nic module (#2449) (#2502) 2021-05-14 09:47:39 +02:00