Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMware: Allow user to specify VM version to latest #56391

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@Akasurde
Copy link
Member

commented May 14, 2019

SUMMARY

User now can specify VM Hardware version to latest.

Fixes: #56273

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

lib/ansible/modules/cloud/vmware/vmware_guest.py

ADDITIONAL INFORMATION
    - name: deploy vm
      vmware_guest:
        hostname: "{{ vcenter_server }}"
        username: "{{ vcenter_user }}"
        password: "{{ vcenter_pass }}"
        validate_certs: no
        datacenter: "{{ datacenter }}"
        state: present
        folder: "/{{ datacenter }}/vm"
        name: VM_1448
        disk:
          - size: 10mb
            autoselect_datastore: yes
        hardware:
          memory_mb: 512
          num_cpus: 1
          version: latest
        guest_id: rhel7_64guest
VMware: Allow user to specify VM version to latest
User now can specify VM Hardware version to latest.

Fixes: #56273

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot

This comment has been minimized.

@Akasurde

This comment has been minimized.

Copy link
Member Author

commented May 14, 2019

@jillr
Copy link
Contributor

left a comment

one suggestion, otherwise lgtm - working on 6.7.

new_version = "vmx-%02d" % temp_version
try:
task = vm_obj.UpgradeVM_Task(new_version)
if temp_version == 'latest':

This comment has been minimized.

Copy link
@jillr

jillr May 17, 2019

Contributor
Suggested change
if temp_version == 'latest':
if temp_version.lower() == 'latest':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.