Skip to content
Snippets Groups Projects
  • Rafael Guterres Jeffman's avatar
    f2865efb
    module_utils: Fix comparison of elements not in IPA object. · f2865efb
    Rafael Guterres Jeffman authored
    This change modifies the comparison of the retrieved IPA object and the
    provided arguments on ansible_freeipa_module.compare_args_ipa when the
    provider argument is an empty string.
    
    If an attribute is not available in 'ipa', its value is considered to be
    a list with an empty string (['']), possibly forcing the conversion of
    the 'args' attribute to a list for comparison. This allows, for example,
    the usage of empty strings which should compare as equals to inexistent
    attributes (None), as is done in IPA API.
    f2865efb
    History
    module_utils: Fix comparison of elements not in IPA object.
    Rafael Guterres Jeffman authored
    This change modifies the comparison of the retrieved IPA object and the
    provided arguments on ansible_freeipa_module.compare_args_ipa when the
    provider argument is an empty string.
    
    If an attribute is not available in 'ipa', its value is considered to be
    a list with an empty string (['']), possibly forcing the conversion of
    the 'args' attribute to a list for comparison. This allows, for example,
    the usage of empty strings which should compare as equals to inexistent
    attributes (None), as is done in IPA API.