diff --git a/awx/main/models/mixins.py b/awx/main/models/mixins.py index fcd4f9a334..184b4c7899 100644 --- a/awx/main/models/mixins.py +++ b/awx/main/models/mixins.py @@ -188,8 +188,14 @@ class SurveyJobTemplateMixin(models.Model): runtime_extra_vars.pop(variable_key) if default is not None: - # do not add variables that contain an empty string, are not required and are nor present in extra_vars - if default == '' and not survey_element.get('required') and variable_key not in runtime_extra_vars: + # do not add variables that contain an empty string, are not required and are not present in extra_vars + # password fields must be skipped, because default values have special behaviour + if ( + default == '' + and not survey_element.get('required') + and survey_element.get('type') != 'password' + and variable_key not in runtime_extra_vars + ): continue decrypted_default = default