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_content_deploy_ovf_template: enable injection of ovf env like in vmware_deploy_ovf #1990

Open
mbx64 opened this issue Jan 31, 2024 · 1 comment

Comments

@mbx64
Copy link

mbx64 commented Jan 31, 2024

SUMMARY

I can use vmware_deploy_ovf to deploy a VM from an OVF file on my ansible controller or from an OVF file on a HTTP server. This way, I can fully customize the template using the inject_ovf_env and properties arguments. But this module always requires the transfer of the OVF file for each VM. Therefore, I would like to use vmware_content_deploy_ovf_template to deploy from an already existing OVF file in the content library. But vmware_content_deploy_ovf_template does not allow the injection of an OVF env and therefore I cannot customize the deployment.

It would be nice to have the same inject_ovf_env feature like in vmware_deploy_ovf.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

vmware_content_deploy_ovf_template

ADDITIONAL INFORMATION
- name: Deploy Virtual Machine from OVF template in content library
  community.vmware.vmware_content_deploy_ovf_template:
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    ovf_template: HAProxy
    datastore: Shared_NFS_Volume
    folder: vm
    datacenter: Sample_DC_1
    name: Sample_VM
    inject_ovf_env: true
    properties:
      appliance.root_pwd: YouGetTheIdea
  delegate_to: localhost
@ihumster
Copy link
Collaborator

Unlike the deploy_ovf module, the vmware_content_deploy_ovf_template module uses the Rest API. The deploy method for LibraryItem accepts a block in deployment_spec additional_parameters, but the format of this block is not clear to me, and additional research is needed on how to prepare data for use there.

Otherwise, implementation of this feature does not look complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants