Skip to content

Commit 430ab33

Browse files
authored
add url deploy feature (#1803)
add url deploy feature SUMMARY Add to vmware_deploy_ovf 'url' parameter (mutually exclusive with 'ovf' parameter) for remote deploy from http server. ISSUE TYPE Feature Pull Request COMPONENT NAME vmware_deploy_ovf Reviewed-by: Mario Lenz <m@riolenz.de> Reviewed-by: Александр <ihumster@ihumster.ru>
1 parent d04fced commit 430ab33

8 files changed

+295
-111
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -389,3 +389,6 @@ changelogs/.plugin-cache.yaml
389389

390390
# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv
391391
tests/integration/cloud-config-vcenter.ini
392+
393+
# Visual Studio Code
394+
.vscode

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Name | Description
111111
[community.vmware.vmware_datastore_cluster_manager](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_datastore_cluster_manager_module.rst)|Manage VMware vSphere datastore cluster's members
112112
[community.vmware.vmware_datastore_info](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_datastore_info_module.rst)|Gather info about datastores available in given vCenter
113113
[community.vmware.vmware_datastore_maintenancemode](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_datastore_maintenancemode_module.rst)|Place a datastore into maintenance mode
114-
[community.vmware.vmware_deploy_ovf](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_deploy_ovf_module.rst)|Deploys a VMware virtual machine from an OVF or OVA file
114+
[community.vmware.vmware_deploy_ovf](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_deploy_ovf_module.rst)|Deploys a VMware virtual machine from an OVF or OVA file, placed on file system or HTTP server
115115
[community.vmware.vmware_drs_group](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_drs_group_module.rst)|Creates vm/host group in a given cluster.
116116
[community.vmware.vmware_drs_group_info](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_drs_group_info_module.rst)|Gathers info about DRS VM/Host groups on the given cluster
117117
[community.vmware.vmware_drs_group_manager](https://github.com/ansible-collections/community.vmware/blob/main/docs/community.vmware.vmware_drs_group_manager_module.rst)|Manage VMs and Hosts in DRS group.

docs/community.vmware.vmware_deploy_ovf_module.rst

+32-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
community.vmware.vmware_deploy_ovf
66
**********************************
77

8-
**Deploys a VMware virtual machine from an OVF or OVA file**
8+
**Deploys a VMware virtual machine from an OVF or OVA file, placed on file system or HTTP server**
99

1010

1111

@@ -16,7 +16,7 @@ community.vmware.vmware_deploy_ovf
1616

1717
Synopsis
1818
--------
19-
- This module can be used to deploy a VMware VM from an OVF or OVA file
19+
- This module can be used to deploy a VMware VM from an OVF or OVA file, placed on file system or HTTP server
2020

2121

2222

@@ -288,6 +288,8 @@ Parameters
288288
</td>
289289
<td>
290290
<div>Path to OVF or OVA file to deploy.</div>
291+
<div>This is a required parameter, if <code>ovf</code> is not set and <code>url</code> parameter must be set.</div>
292+
<div><code>ovf</code> and <code>url</code> are mutually exclusive parameters.</div>
291293
<div style="font-size: small; color: darkgreen"><br/>aliases: ova</div>
292294
</td>
293295
</tr>
@@ -411,6 +413,23 @@ Parameters
411413
<div>Resource Pool to deploy to.</div>
412414
</td>
413415
</tr>
416+
<tr>
417+
<td colspan="1">
418+
<div class="ansibleOptionAnchor" id="parameter-"></div>
419+
<b>url</b>
420+
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
421+
<div style="font-size: small">
422+
<span style="color: purple">string</span>
423+
</div>
424+
</td>
425+
<td>
426+
</td>
427+
<td>
428+
<div>URL for OVA file to deploy.</div>
429+
<div>This is a required parameter, if <code>url</code> is not set and <code>ovf</code> parameter must be set.</div>
430+
<div><code>url</code> and <code>ovf</code> are mutually exclusive parameters.</div>
431+
</td>
432+
</tr>
414433
<tr>
415434
<td colspan="1">
416435
<div class="ansibleOptionAnchor" id="parameter-"></div>
@@ -498,6 +517,7 @@ Notes
498517
-----
499518

500519
.. note::
520+
- For use https as source need enable in firewall incoming 443 port
501521
- All modules requires API write access and hence is not supported on a free ESXi license.
502522

503523

@@ -539,6 +559,14 @@ Examples
539559
ovf: /path/to/ubuntu-16.04-amd64.ovf
540560
delegate_to: localhost
541561
562+
- community.vmware.vmware_deploy_ovf:
563+
hostname: '{{ vcenter_hostname }}'
564+
username: '{{ vcenter_username }}'
565+
password: '{{ vcenter_password }}'
566+
url: https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64.ova
567+
wait_for_ip_address: true
568+
delegate_to: localhost
569+
542570
543571
544572
Return Values
@@ -581,4 +609,5 @@ Status
581609
Authors
582610
~~~~~~~
583611

584-
- Matt Martz (@sivel)
612+
- Alexander Nikitin (@ihumster)
613+
- Matt Martz <matt@sivel.net>

0 commit comments

Comments
 (0)