diff --git a/lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py b/lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py index 6eb690baed8..f1da9dd1428 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py +++ b/lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py @@ -56,6 +56,12 @@ options: default: thin description: - Disk provisioning type. + enable_hidden_properties: + description: + - Enable source properties that are marked as ovf:userConfigurable=false + default: "no" + type: bool + version_added: "2.8" fail_on_spec_warnings: description: - Cause the module to treat OVF Import Spec warnings as errors. @@ -377,6 +383,10 @@ class VMwareDeployOvf: spec_params ) + if self.params['enable_hidden_properties']: + for prop in self.import_spec.importSpec.configSpec.vAppConfig.property: + prop.info.userConfigurable = True + errors = [to_native(e.msg) for e in getattr(self.import_spec, 'error', [])] if self.params['fail_on_spec_warnings']: errors.extend( @@ -543,6 +553,10 @@ def main(): 'deployment_option': { 'default': None, }, + 'enable_hidden_properties': { + 'default': False, + 'type': 'bool', + }, 'folder': { 'default': None, },