{"record":{"id":"a9c045c32dedccf0","repo":"ansible/ansible","slug":"required-config-get-config-label-plugin-type-pl","errorCode":null,"errorMessage":"Required config {_get_config_label(plugin_type, plugin_name, config)} not provided.","messagePattern":"Required config (.+?) not provided\\.","errorType":"exception","errorClass":"AnsibleRequiredOptionError","httpStatus":null,"severity":"error","filePath":"lib/ansible/config/manager.py","lineNumber":687,"sourceCode":"                            if temp_value is not None:\n                                # set value and origin\n                                value = temp_value\n                                origin = cfile\n                                origin_ftype = ftype\n                                if 'deprecated' in entry:\n                                    if ftype == 'ini':\n                                        self.DEPRECATED.append(('[%s]%s' % (entry['section'], entry['key']), entry['deprecated']))\n                                    else:\n                                        raise AnsibleError('Unimplemented file type: %s' % ftype)\n\n                    except Exception as e:\n                        sys.stderr.write(\"Error while loading config %s: %s\" % (cfile, to_native(e)))\n\n            # set default if we got here w/o a value\n            if value is None:\n                if defs[config].get('required', False):\n                    if not plugin_type or config not in INTERNAL_DEFS.get(plugin_type, {}):\n                        raise AnsibleRequiredOptionError(f\"Required config {_get_config_label(plugin_type, plugin_name, config)} not provided.\")\n                else:\n                    origin = 'default'\n                    value = self.template_default(defs[config].get('default'), variables, key_name=_get_config_label(plugin_type, plugin_name, config))\n\n            if templar:\n                value = templar.template(value)\n\n            try:\n                # ensure correct type, can raise exceptions on mismatched types\n                value = ensure_type(value, defs[config].get('type'), origin=origin, origin_ftype=origin_ftype)\n            except ValueError as ex:\n                if origin.startswith('env:') and value == '':\n                    # this is empty env var for non string so we can set to default\n                    origin = 'default'\n                    value = ensure_type(defs[config].get('default'), defs[config].get('type'), origin=origin, origin_ftype=origin_ftype)\n                else:\n                    value_type = defs[config].get('type')\n                    raise AnsibleOptionsError(","sourceCodeStart":669,"sourceCodeEnd":705,"githubUrl":"https://github.com/ansible/ansible/blob/9cf16a4aca7898481c257f1e17ad28d0b67b1f85/lib/ansible/config/manager.py#L669-L705","documentation":"Error \"Required config {_get_config_label(plugin_type, plugin_name, config)} not provided.\" thrown in ansible/ansible.","triggerScenarios":"Thrown at lib/ansible/config/manager.py:687 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the required config option in ansible.cfg, an environment variable, or the plugin's documented variable source.","Check the plugin documentation for the exact config name that must be provided."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9cf16a4aca7898481c257f1e17ad28d0b67b1f85","analyzedAt":"2026-08-15T00:15:47.100Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}