ansible-collections / community.vmware

Ansible Collection for VMware
GNU General Public License v3.0
351 stars 336 forks source link

Add VMware vCenter Upgrade Module #1088

Open scottd018 opened 3 years ago

scottd018 commented 3 years ago
SUMMARY

Add a module that will allow users to upgrade VMware vCenter appliances. I have a working POC for the module located at https://github.com/scottd018/ansible-vmware-vcenter-upgrade. I wanted to gauge interest if this would be able to be supported by the community. The one problem I foresee is support for testing as the API and versions progress, which could be challenging.

ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION

Would allow users to upgrade vCenter Server appliances

From the example located in my POC repo at https://github.com/scottd018/ansible-vmware-vcenter-upgrade:

- name: upgrade vmware vcenter to latest version
  community.vmware.vmware_vcenter_upgrade:
      hostname: '{{ vcenter_hostname }}'
      username: '{{ vcenter_username }}'
      password: '{{ vcenter_password }}'
      action:   'upgrade'
  delegate_to: localhost

- name: upgrade vmware vcenter to specific version
  community.vmware.vmware_vcenter_upgrade:
      hostname: '{{ vcenter_hostname }}'
      username: '{{ vcenter_username }}'
      password: '{{ vcenter_password }}'
      state:    'upgrade'
      version:  '7.0.3.00100'
  delegate_to: localhost

- name: stage vmware vcenter specific version upgrade
  community.vmware.vmware_vcenter_upgrade:
      hostname: '{{ vcenter_hostname }}'
      username: '{{ vcenter_username }}'
      password: '{{ vcenter_password }}'
      state:    'stage'
      version:  '7.0.3.00100'
  delegate_to: localhost

- name: list vmware vcenter upgrade information
  community.vmware.vmware_vcenter_upgrade:
      hostname: '{{ vcenter_hostname }}'
      username: '{{ vcenter_username }}'
      password: '{{ vcenter_password }}'
      state:    'query'
  delegate_to: localhost
ansibullbot commented 3 years ago

Files identified in the description: None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

MallocArray commented 3 years ago

This is certainly a needed module

Akasurde commented 3 years ago

I feel the same. Feel free to open a new PR and let's get it reviewed. What do you think @sky-joker @goneri @mariolenz @tejaswi-bachu @Tomorrow9?

sky-joker commented 3 years ago

Thanks for requesting a new module!

I think it is a useful module if there is one.
But, I look that the module is required vCenter REST API, not SOAP API.
I'm not sure, maybe it might be better to request to vmware.rest_vmware.
If vmware.rest_vmware maintainers can't handle the module requesting, I think it's ok that we will handle it here.