ansible/ansible · error · AnsibleRequiredOptionError
Required config {_get_config_label(plugin_type, plugin_name,
Error message
Required config {_get_config_label(plugin_type, plugin_name, config)} not provided. What it means
Error "Required config {_get_config_label(plugin_type, plugin_name, config)} not provided." thrown in ansible/ansible.
Source
Thrown at lib/ansible/config/manager.py:687
if temp_value is not None:
# set value and origin
value = temp_value
origin = cfile
origin_ftype = ftype
if 'deprecated' in entry:
if ftype == 'ini':
self.DEPRECATED.append(('[%s]%s' % (entry['section'], entry['key']), entry['deprecated']))
else:
raise AnsibleError('Unimplemented file type: %s' % ftype)
except Exception as e:
sys.stderr.write("Error while loading config %s: %s" % (cfile, to_native(e)))
# set default if we got here w/o a value
if value is None:
if defs[config].get('required', False):
if not plugin_type or config not in INTERNAL_DEFS.get(plugin_type, {}):
raise AnsibleRequiredOptionError(f"Required config {_get_config_label(plugin_type, plugin_name, config)} not provided.")
else:
origin = 'default'
value = self.template_default(defs[config].get('default'), variables, key_name=_get_config_label(plugin_type, plugin_name, config))
if templar:
value = templar.template(value)
try:
# ensure correct type, can raise exceptions on mismatched types
value = ensure_type(value, defs[config].get('type'), origin=origin, origin_ftype=origin_ftype)
except ValueError as ex:
if origin.startswith('env:') and value == '':
# this is empty env var for non string so we can set to default
origin = 'default'
value = ensure_type(defs[config].get('default'), defs[config].get('type'), origin=origin, origin_ftype=origin_ftype)
else:
value_type = defs[config].get('type')
raise AnsibleOptionsError(View on GitHub (pinned to 9cf16a4aca)
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.
When it happens
Trigger: Thrown at lib/ansible/config/manager.py:687 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ansible/ansible@9cf16a4aca (2026-08-15).
Data as JSON: /api/errors/a9c045c32dedccf0.
Report an issue: GitHub.