mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
VMware: vCenter Cluster EVC Mode : new module (#56089)
* add vmware_evc_mode module * alter result message for absent/absent * Apply suggestions from code review Co-Authored-By: CastawayEGR <36353334+CastawayEGR@users.noreply.github.com> * add idempotency test * change result dict to evc_mode_msg * refactor to use pyvmomi class * fix update to only process task on update * minimize update code * add single quotes around vars to match other code * pass datacenter to cluster find * add check_mode to disable test
This commit is contained in:
2
test/integration/targets/vmware_evc_mode/aliases
Normal file
2
test/integration/targets/vmware_evc_mode/aliases
Normal file
@@ -0,0 +1,2 @@
|
||||
shippable/vcenter/group1
|
||||
cloud/vcenter
|
||||
2
test/integration/targets/vmware_evc_mode/meta/main.yml
Normal file
2
test/integration/targets/vmware_evc_mode/meta/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- prepare_vmware_tests
|
||||
25
test/integration/targets/vmware_evc_mode/tasks/main.yml
Normal file
25
test/integration/targets/vmware_evc_mode/tasks/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
# Test code for the vmware evc mode module.
|
||||
# Copyright: (c) 2019, Michael Tipton <mike () ibeta.org>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
- when: vcsim is not defined
|
||||
block:
|
||||
- name: Enable EVC mode on vCenter Cluster
|
||||
vmware_evc_mode: &vmware_evc_data
|
||||
hostname: "{{ vcenter_hostname }}"
|
||||
username: "{{ vcenter_username }}"
|
||||
password: "{{ vcenter_password }}"
|
||||
validate_certs: no
|
||||
evc_mode: intel-broadwell
|
||||
state: present
|
||||
check_mode: yes
|
||||
|
||||
- name: Enable EVC mode on vCenter Cluster
|
||||
vmware_evc_mode:
|
||||
<<: *vmware_evc_data
|
||||
|
||||
- name: Disable EVC mode on vCenter Cluster
|
||||
vmware_evc_mode:
|
||||
<<: *vmware_evc_data
|
||||
state: absent
|
||||
check_mode: yes
|
||||
Reference in New Issue
Block a user