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

Allow a username and password to be provided when using a URL to define an OVF file in community.vmware.vmware_deploy_ovf module #2242

Open
5p4rkP1ug opened this issue Nov 11, 2024 · 3 comments

Comments

@5p4rkP1ug
Copy link

5p4rkP1ug commented Nov 11, 2024

SUMMARY

I have an OVF file stored on a web server, but it expects authentication to obtain the file. In community.vmware.vmware_deploy_ovf module, I can't define a username and password when I use url: as an OVF source.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.vmware.vmware_deploy_ovf module

ADDITIONAL INFORMATION

Below is an example of something I'd like to achieve, but I can't because username and password aren't children of url.

 name: Deploy OVF from URL with authentication
  community.vmware.vmware_deploy_ovf:
    hostname: "{{ vsphere_server }}"
    username: "{{ vsphere_username }}"
    password: "{{ vsphere_password }}"
    folder: "{{ vsphere_folder }}"
    datacenter: "{{ vsphere_datacenter }}"
    datastore: "{{ vsphere_datastore }}"
    cluster: "{{ vsphere_cluster }}"
    resource_pool: "{{ vsphere_resource_pool|default('Resources', true) }}"
    name: "{{ vsphere_vm_name }}"
    networks: "{u'nic0':u'{{ vsphere_network }}'}"
    url: "https://supersecure.url/path/to/file.ovf"
      username: abc
      password: 123
    inject_ovf_env: true
    properties:
      ...
    power_on: false
  delegate_to: localhost
@mariolenz
Copy link
Collaborator

    url: "https://supersecure.url/path/to/file.ovf"
      username: abc
      password: 123

I'm not sure if this is possible in YAML. I guess we need to find another way to express this.

Anyway, what kind of authentication are we talking about? Basic / RFC 7617?

@5p4rkP1ug
Copy link
Author

5p4rkP1ug commented Nov 11, 2024

    url: "https://supersecure.url/path/to/file.ovf"
      username: abc
      password: 123

I'm not sure if this is possible in YAML. I guess we need to find another way to express this.

Anyway, what kind of authentication are we talking about? Basic / RFC 7617?

Yes, basic authentication in this scenario. Using cURL, I can provide a username and password in the following fashion and it works: https://USERNAME:[email protected]/path/to/file.ovf.

Another nice to have would also to be able to provide raw data to populate a username and password field. For example, using cURL, I can define a --data-raw attribute and provide it something like this: user=[USERNAME]&password=[PASSWORD]&submit=Log+in

@5p4rkP1ug
Copy link
Author

Oh, another thing to mention whilst it crosses my mind. The URL will have parameters in it as follows: https://supersecure.url/path/to/file.ova?parameterOne=True - I should have mentioned this in my initial post.

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

No branches or pull requests

2 participants