我在CentOS 7上安装了ansible。我尝试运行一个剧本,但是每次我都会收到以下错误:
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 147, in run
res = self._execute()
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 620, in _execute
self._connection = self._get_connection(cvars, templar)
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 957, in _get_connection
socket_path = start_connection(self._play_context, options, self._task._uuid)
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 1124, in start_connection
master, slave = pty.openpty()
File "/usr/lib64/python2.7/pty.py", line 29, in openpty
master_fd, slave_name = _open_terminal()
File "/usr/lib64/python2.7/pty.py", line 70, in _open_terminal
raise os.error, 'out of pty devices'
OSError: out of pty devices
fatal: [SW1]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}我还通过更改虚拟执行环境进行了测试,但它仍然无法工作。
task path: /tmp/bwrap_10_czq13qv4/awx_10_5t93z8ow/project/01_test.yml:2
<10.1.16.190> attempting to start connection
<10.1.16.190> using connection plugin network_cli
The full traceback is:
Traceback (most recent call last):
File "/opt/my-envs/custom-venv/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 147, in run
res = self._execute()
File "/opt/my-envs/custom-venv/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 620, in _execute
self._connection = self._get_connection(cvars, templar)
File "/opt/my-envs/custom-venv/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 957, in _get_connection
socket_path = start_connection(self._play_context, options, self._task._uuid)
File "/opt/my-envs/custom-venv/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 1124, in start_connection
master, slave = pty.openpty()
File "/usr/lib64/python3.6/pty.py", line 29, in openpty
master_fd, slave_name = _open_terminal()
File "/usr/lib64/python3.6/pty.py", line 59, in _open_terminal
raise OSError('out of pty devices')
OSError: out of pty devices
fatal: [S1]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}我尝试手动启动剧本,而不使用Ansible Tower和"ansible- playbook“命令,它可以工作。
我遵照下列网站的指示:
我还搜索了其他论坛,我没有找到其他人谁有同样的问题,我在Ansible塔。有人知道我怎么解决这个问题吗?
发布于 2022-03-08 14:34:11
问题解决了。这是从3.8.5版的。如果您有同样的问题,请返回到以后的版本。我会通知红帽支援
https://stackoverflow.com/questions/71383203
复制相似问题