Summary
using --step with strategy: free makes ansible hang on invalid input.
Issue Type
Bug Report
Component Name
core
Ansible Version
$ ansible --version
ansible [core 2.20.1]
config file = None
configured module search path = ['/home/abma/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/abma/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.13.12 (main, Feb 4 2026, 15:06:39) [GCC 15.2.0] (/usr/bin/python3)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)
Configuration
$ ansible-config dump --only-changed
CONFIG_FILE() = None
GALAXY_SERVERS:
OS / Environment
Debian forky
Steps to Reproduce
running this playbook.yml:
- name: ping
hosts: all
strategy: free
tasks:
- name: ping
ansible.builtin.ping:
with
ansible-playbook -i inventory.ini playbook.yml --step
makes ansible hang when an invalid input is typed, in this case just a return:
$ ansible-playbook -i inventory.ini playbook.yml --step
PLAY [ping] *******************************************************************************************************************************************************************************************************
Perform task: TASK: Gathering Facts on localhost (N)o/(y)es/(c)ontinue:
Perform task: TASK: Gathering Facts on localhost (N)o/(y)es/(c)ontinue: **********************************************************************************************************************************************
any input that is typed after the second prompt is ignored.
When the line "strategy: free" is removed the same command works as expected.
Expected Results
When pressing return the task should be skipped.
Actual Results
Ansible hangs, no prompt is shown.
$ ansible-playbook -i inventory.ini playbook.yml --step -vvvv
ansible-playbook [core 2.20.1]
config file = None
configured module search path = ['/home/abma/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/abma/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.13.12 (main, Feb 4 2026, 15:06:39) [GCC 15.2.0] (/usr/bin/python3)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)
No config file found; using defaults
setting up inventory plugins
Loading collection ansible.builtin from
host_list declined parsing /home/abma/dev/ansible_test/inventory.ini as it did not pass its verify_file() method
script declined parsing /home/abma/dev/ansible_test/inventory.ini as it did not pass its verify_file() method
auto declined parsing /home/abma/dev/ansible_test/inventory.ini as it did not pass its verify_file() method
yaml declined parsing /home/abma/dev/ansible_test/inventory.ini as it did not pass its verify_file() method
Parsed /home/abma/dev/ansible_test/inventory.ini inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3/dist-packages/ansible/plugins/callback/default.py
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: playbook.yml ********************************************************************************************************************************************************************************************
Positional arguments: playbook.yml
verbosity: 4
remote_user: ansible
connection: ssh
become_method: sudo
tags: ('all',)
inventory: ('/home/abma/dev/ansible_test/inventory.ini',)
forks: 5
step: True
1 plays in playbook.yml
PLAY [ping] *******************************************************************************************************************************************************************************************************
Perform task: TASK: Gathering Facts on sonne (N)o/(y)es/(c)ontinue:
Perform task: TASK: Gathering Facts on sonne (N)o/(y)es/(c)ontinue: ***********************************************************************************************************************************************
Code of Conduct
Summary
using --step with strategy: free makes ansible hang on invalid input.
Issue Type
Bug Report
Component Name
core
Ansible Version
Configuration
OS / Environment
Debian forky
Steps to Reproduce
running this playbook.yml:
with
ansible-playbook -i inventory.ini playbook.yml --step
makes ansible hang when an invalid input is typed, in this case just a return:
any input that is typed after the second prompt is ignored.
When the line "strategy: free" is removed the same command works as expected.
Expected Results
When pressing return the task should be skipped.
Actual Results
Code of Conduct