Backlog
Labels
affects_2.22This issue/PR affects Ansible v2.22bugThis issue/PR relates to a bug.has_prThis issue has an associated PR.
Description
Summary
In the task debugger, update_task followed by redo fails for any task that has register:. The worker dies with AttributeError: '_AnsibleTaggedStr' object has no attribute 'items'. Without register: the same commands work. This is a regression: the same playbook works on ansible-core 2.19.11.
Issue Type
Bug Report
Component Name
ansible-playbook
Ansible Version
$ ansible --version
ansible [core 2.22.0]
config file = /home/claude/ansible/ansible.cfg
configured module search path = ['/home/claude/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/claude/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.14.10 (main, Oct 26 2026, 15:12:11) [GCC 16.2.0] (/usr/bin/python3)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.6)Configuration
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CACHE_PLUGIN(/home/claude/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/claude/ansible/ansible.cfg) = /tmp/ansible_facts_cache
CACHE_PLUGIN_TIMEOUT(/home/claude/ansible/ansible.cfg) = 86400
CONFIG_FILE() = /home/claude/ansible/ansible.cfg
DEFAULT_BECOME(/home/claude/ansible/ansible.cfg) = True
DEFAULT_BECOME_METHOD(/home/claude/ansible/ansible.cfg) = sudo
DEFAULT_BECOME_USER(/home/claude/ansible/ansible.cfg) = root
DEFAULT_FORKS(/home/claude/ansible/ansible.cfg) = 10
DEFAULT_GATHERING(/home/claude/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(/home/claude/ansible/ansible.cfg) = ['/home/claude/ansible/inventory.ini']
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/claude/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/home/claude/ansible/ansible.cfg) = /tmp/ansible.log
DEFAULT_REMOTE_USER(/home/claude/ansible/ansible.cfg) = ansible
DEFAULT_VAULT_PASSWORD_FILE(/home/claude/ansible/ansible.cfg) = /home/claude/ansible/.vault_pass
GALAXY_SERVERS:
BECOME:
======
runas:
_____
become_user(/home/claude/ansible/ansible.cfg) = root
su:
__
become_user(/home/claude/ansible/ansible.cfg) = root
sudo:
____
become_user(/home/claude/ansible/ansible.cfg) = root
CACHE:
=====
jsonfile:
________
_timeout(/home/claude/ansible/ansible.cfg) = 86400
_uri(/home/claude/ansible/ansible.cfg) = /tmp/ansible_facts_cache
CALLBACK:
========
default:
_______
result_format(/home/claude/ansible/ansible.cfg) = yaml
minimal:
_______
result_format(/home/claude/ansible/ansible.cfg) = yaml
CONNECTION:
==========
ssh:
___
pipelining(/home/claude/ansible/ansible.cfg) = True
remote_user(/home/claude/ansible/ansible.cfg) = ansible
ssh_args(/home/claude/ansible/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=60sOS / Environment
Debian trixie / forky
Steps to Reproduce
repro.yml:
- hosts: localhost
gather_facts: false
tasks:
- name: with register
ansible.builtin.command: echo hi
register: out
debugger: alwaysrun
ansible-playbook -c local repro.yml
Then enter
update_task
redo
Expected Results
Debugger repeats the task
Actual Results
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 327, in _execute
raise AnsibleTaskError(obj=self._task.get_ds()) from ex
ansible.errors.AnsibleTaskError: Task failed: '_AnsibleTaggedStr' object has no attribute 'items'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 116, in run
utr = self._execute()
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 329, in _execute
utr = UnifiedTaskResult.create_from_action_exception(atex, accept_result_contribution=True)
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 1275, in create_from_action_exception
TaskContext.current()._record_result(utr)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 303, in _record_result
self._enable_registered_vars()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 409, in _enable_registered_vars
if register_projections := self.get_register_projections():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 148, in get_register_projections
return {var_name: _engine.TemplateExpressionWrapper(expression=expression) for var_name, expression in self._task.register.items()}
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_AnsibleTaggedStr' object has no attribute 'items'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/executor/process/worker.py", line 208, in run
return self._run()
~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/ansible/executor/process/worker.py", line 234, in _run
utr = te.run()
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 126, in run
utr = UnifiedTaskResult.create_from_action_exception(ex)
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 1275, in create_from_action_exception
TaskContext.current()._record_result(utr)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 303, in _record_result
self._enable_registered_vars()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 409, in _enable_registered_vars
if register_projections := self.get_register_projections():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3/dist-packages/ansible/_internal/_task.py", line 148, in get_register_projections
return {var_name: _engine.TemplateExpressionWrapper(expression=expression) for var_name, expression in self._task.register.items()}
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_AnsibleTaggedStr' object has no attribute 'items'
[ERROR]: A worker was found in a dead stateCode of Conduct
- I agree to follow the Ansible Code of Conduct
Metadata
Metadata
Assignees
Labels
affects_2.22This issue/PR affects Ansible v2.22bugThis issue/PR relates to a bug.has_prThis issue has an associated PR.
Activity
[-]update_task, redo crash debugger for a task with register: in 2.22[/-][+]update_task, redo crash debugger for a task with register: in 2.22 (also tested with 2.22.1rc1)[/+]ansibot commentedon Nov 27, 2026
Files identified in the description:
bin/ansible-playbookIf these files are incorrect, please update the
component namesection of the description or use the component bot command.Reset validation state before debugger update_task reloads the task