#85703·ansible

`Ansible.builtin.pause` fails with Inappropriate ioctl for device

Author: xshen1Created Aug 19, 2025Updated Sep 17, 2026
Labelsmodulebughas_prP3needs_verifiedaffects_2.18

Summary

I tried to use ansible.builtin.pause with Ansible Molecule testing through Docker container in github runner flow. I did pass in docker run -t to the workflow to enable pseudo-tty, but it still returns the message " Inappropriate ioctl for device error

Issue Type

Bug Report

Component Name

ansible.builtin.pause

Ansible Version

ansible [core 2.18.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/ws1dev/collections/content/plugins/modules']
  ansible python module location = /usr/share/venv/lib/python3.12/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/ws1dev/collections:/usr/share/ansible/collections:/ws1dev/collections/content/collections
  executable location = /usr/share/venv/bin/ansible
  python version = 3.12.11 (main, Jun 25 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (/usr/share/venv/bin/python)
  jinja version = 3.1.5
  libyaml = True

Configuration

# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
ANSIBLE_FORCE_COLOR(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = ansible.builtin.jsonfile
CACHE_PLUGIN_CONNECTION(env: ANSIBLE_CACHE_PLUGIN_CONNECTION) = ./tmp/ansible_facts
CALLBACKS_ENABLED(/etc/ansible/ansible.cfg) = ['timer', 'junit', 'default']
COLLECTIONS_PATHS(env: ANSIBLE_COLLECTIONS_PATH) = ['/root/.ansible/collections', '/ws1dev/collections', '/usr/share/ansible/collections', '/ws1dev/collect>
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 25
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = smart
DEFAULT_INVENTORY_PLUGIN_PATH(env: ANSIBLE_INVENTORY_PLUGINS) = ['/ws1dev/collections/content/plugins/inventory']
DEFAULT_LOAD_CALLBACK_PLUGINS(/etc/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(env: ANSIBLE_LOG_PATH) = /ws1dev/collections/ansible.log
DEFAULT_LOOKUP_PLUGIN_PATH(env: ANSIBLE_LOOKUP_PLUGINS) = ['/ws1dev/collections/content/plugins/lookup']
DEFAULT_MANAGED_STR(/etc/ansible/ansible.cfg) = Ansible Managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
DEFAULT_MODULE_PATH(env: ANSIBLE_LIBRARY) = ['/ws1dev/collections/content/plugins/modules']
DEFAULT_MODULE_UTILS_PATH(env: ANSIBLE_MODULE_UTILS) = ['/ws1dev/collections/content/plugins/module_utils']
DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = ['/root/.ansible/roles', '/ws1dev/roles', '/usr/share/ansible/roles', '/ws1dev/collections/content/roles']
DEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = yaml
DEFAULT_VERBOSITY(env: ANSIBLE_VERBOSITY) = 2
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INVENTORY_ANY_UNPARSED_IS_FAILED(/etc/ansible/ansible.cfg) = True
INVENTORY_IGNORE_PATTERNS(/etc/ansible/ansible.cfg) = ['^aws$', '^vcenter$']
LOCALHOST_WARNING(env: ANSIBLE_LOCALHOST_WARNING) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = True
RETRY_FILES_SAVE_PATH(env: ANSIBLE_RETRY_FILES_SAVE_PATH) = /ws1dev/collections/tmp/retries

OS / Environment

AWS linux 23

Steps to Reproduce

- name: testing
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Pause for 1 second
      ansible.builtin.pause:
        seconds: 1

for docker I have something like

docker run --rm  -t -v /run/docker.sock:/run/docker.sock -v ./drivers:/drivers -v ./tools:/opt/tools -v ./utils:/opt/utils

Expected Results

I expect pause either to pass with no error, or maybe no need to access tty ot something

Actual Results

fatal: [LNX-AL2023-S3-38e0]: FAILED! => {"msg": "[Errno 25] Inappropriate ioctl for device"}
Pausing for 1 seconds

Code of Conduct

  • I agree to follow the Ansible Code of Conduct