Invalid vars_files entry found: %r vars_files entries should be either a string type or a list of string types after template expansion
rate through the (potential) files, and break out # as soon as we read one from the list. If none are found, we # raise an error, which is silently ignored at this point. try: for vars_file in vars_file_list: vars_file = templar.template(vars_file) if not (isinstance(vars_file, Sequence)): raise AnsibleError( "Invalid vars_files entry found: %r\n" "vars_files entries should be either a string type or " "a list of string types after template expansion" % vars_file ) try: data = preprocess_vars(self._loader.load_from_file(vars_file, unsafe=True)) if data is not None:
Ways to fix
Verify that your play-level code is properly indented according to yaml syntax.
Check what comes immediately after the vars_files section on the play level. For example, forgetting to add "tasks:" after the vars_files section will lead ansible to attempt to read your tasks as vars_files, and fail with this exception because of the syntax differences.