@ -78,9 +78,9 @@ options:
type : bool
type : bool
download_timeout :
download_timeout :
description :
description :
- The user defined timeout in minute of exporting file .
- The user defined timeout in second of exporting file .
- If the vmdk file is too large to export in 10 minutes , specify the value larger than 10 , the maximum value is 60 .
- If the vmdk file is too large , you can increase the value .
default : 1 0
default : 3 0
type : int
type : int
version_added : ' 2.9 '
version_added : ' 2.9 '
extends_documentation_fragment : vmware . documentation
extends_documentation_fragment : vmware . documentation
@ -163,7 +163,7 @@ class VMwareExportVmOvf(PyVmomi):
# set lease progress update interval to 15 seconds
# set lease progress update interval to 15 seconds
self . lease_interval = 15
self . lease_interval = 15
self . facts = { ' device_files ' : [ ] }
self . facts = { ' device_files ' : [ ] }
self . download_timeout = 10
self . download_timeout = None
def create_export_dir ( self , vm_obj ) :
def create_export_dir ( self , vm_obj ) :
self . ovf_dir = os . path . join ( self . params [ ' export_dir ' ] , vm_obj . name )
self . ovf_dir = os . path . join ( self . params [ ' export_dir ' ] , vm_obj . name )
@ -217,7 +217,6 @@ class VMwareExportVmOvf(PyVmomi):
export_with_iso = False
export_with_iso = False
if ' export_with_images ' in self . params and self . params [ ' export_with_images ' ] :
if ' export_with_images ' in self . params and self . params [ ' export_with_images ' ] :
export_with_iso = True
export_with_iso = True
if 60 > self . params [ ' download_timeout ' ] > 10 :
self . download_timeout = self . params [ ' download_timeout ' ]
self . download_timeout = self . params [ ' download_timeout ' ]
ovf_files = [ ]
ovf_files = [ ]
@ -332,7 +331,7 @@ def main():
datacenter = dict ( type = ' str ' , default = ' ha-datacenter ' ) ,
datacenter = dict ( type = ' str ' , default = ' ha-datacenter ' ) ,
export_dir = dict ( type = ' path ' , required = True ) ,
export_dir = dict ( type = ' path ' , required = True ) ,
export_with_images = dict ( type = ' bool ' , default = False ) ,
export_with_images = dict ( type = ' bool ' , default = False ) ,
download_timeout = dict ( type = ' int ' , default = 1 0) ,
download_timeout = dict ( type = ' int ' , default = 3 0) ,
)
)
module = AnsibleModule ( argument_spec = argument_spec ,
module = AnsibleModule ( argument_spec = argument_spec ,