@ -91,7 +91,7 @@ class KubernetesRawModule(KubernetesAnsibleModule):
argument_spec [ ' wait_condition ' ] = dict ( type = ' dict ' , default = None , options = self . condition_spec )
argument_spec [ ' wait_condition ' ] = dict ( type = ' dict ' , default = None , options = self . condition_spec )
argument_spec [ ' validate ' ] = dict ( type = ' dict ' , default = None , options = self . validate_spec )
argument_spec [ ' validate ' ] = dict ( type = ' dict ' , default = None , options = self . validate_spec )
argument_spec [ ' append_hash ' ] = dict ( type = ' bool ' , default = False )
argument_spec [ ' append_hash ' ] = dict ( type = ' bool ' , default = False )
argument_spec [ ' apply ' ] = dict ( type = ' bool ' )
argument_spec [ ' apply ' ] = dict ( type = ' bool ' , default = False )
return argument_spec
return argument_spec
def __init__ ( self , k8s_kind = None , * args , * * kwargs ) :
def __init__ ( self , k8s_kind = None , * args , * * kwargs ) :
@ -124,12 +124,10 @@ class KubernetesRawModule(KubernetesAnsibleModule):
if self . params [ ' merge_type ' ] :
if self . params [ ' merge_type ' ] :
if LooseVersion ( self . openshift_version ) < LooseVersion ( " 0.6.2 " ) :
if LooseVersion ( self . openshift_version ) < LooseVersion ( " 0.6.2 " ) :
self . fail_json ( msg = missing_required_lib ( " openshift >= 0.6.2 " , reason = " for merge_type " ) )
self . fail_json ( msg = missing_required_lib ( " openshift >= 0.6.2 " , reason = " for merge_type " ) )
if self . params . get ( ' apply ' ) is not None :
self . apply = self . params . get ( ' apply ' , False )
if self . apply :
if not HAS_K8S_APPLY :
if not HAS_K8S_APPLY :
self . fail_json ( msg = missing_required_lib ( " openshift >= 0.9.2 " , reason = " for apply " ) )
self . fail_json ( msg = missing_required_lib ( " openshift >= 0.9.2 " , reason = " for apply " ) )
self . apply = self . params [ ' apply ' ]
else :
self . apply = HAS_K8S_APPLY
if resource_definition :
if resource_definition :
if isinstance ( resource_definition , string_types ) :
if isinstance ( resource_definition , string_types ) :