I just git pulled the latest build from GitHub, and then ran the following two commands as recommended on the Installation page:
$ git pull --rebase
$ git submodule update --init --recursive
However, I am now getting an exception that the 'Connection' object has no attribute '_split_ssh_args' on my target hosts.
I must have missed something. My control host is running CentOS 7.1. What should I do to fix this?
Here is a verbose output:
<192.168.1.12> ESTABLISH SSH CONNECTION FOR USER: ansible
...nothing from that IP for several lines while other machines' output is recorded, then...
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg/ansible/executor/process/worker.py", line 114, in run
self._shared_loader_obj,
File "/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg/ansible/executor/task_executor.py", line 119, in run
res = self._execute()
File "/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg/ansible/executor/task_executor.py", line 402, in _execute
result = self._handler.run(task_vars=variables)
File "/home/user/ansible/lib/ansible/plugins/action/normal.py", line 33, in run
results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars))
File "/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg/ansible/plugins/action/__init__.py", line 390, in _execute_module
tmp = self._make_tmp_path()
File "/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg/ansible/plugins/action/__init__.py", line 205, in _make_tmp_path
result = self._low_level_execute_command(cmd, sudoable=False)
File "/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg/ansible/plugins/action/__init__.py", line 502, in _low_level_execute_command
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/home/ansible/ansible/lib/ansible/plugins/connection/ssh.py", line 590, in exec_command
return_tuple = self._exec_command(*args, **kwargs)
File "/home/ansible/ansible/lib/ansible/plugins/connection/ssh.py", line 565, in _exec_command
cmd = self._build_command('ssh', '-tt', self.host, cmd)
File "/home/ansible/ansible/lib/ansible/plugins/connection/ssh.py", line 151, in _build_command
args = self._split_ssh_args(self._play_context.ssh_args)
AttributeError: 'Connection' object has no attribute '_split_ssh_args'
fatal: [192.168.1.12]: FAILED! => {"failed": true, "stdout": ""}
Thanks for the advice. I tried running that command, followed by the submodule commands, and still got the same playbook error.
Then, I rm -rf’d my ansible install directory, cloned the current github again, and ran the source hacking/env-setup command again.
Still no dice.
Every host fails in every playbook I have tried, with the same error "AttributeError: ‘Connection’ object has no attribute ‘_split_ssh_args’ "
Single-host playbooks fail with the same error.
Could this be caused by custom plugin paths pointing to where ansible is installed?
set plugin path directories here, separate with colons
There was a change to the ConnectionBase and the ssh connection plugin, to move some useful methods onto the base class instead of being part of the ssh Connection class. Part of that was renaming _split_args to _split_ssh_args and moving it to ConnectionBase.
If this is failing, it seems that you may have a partially updated version of ansible.
I did an rm -rf of my ansible installation and re-cloned it from github right before reproducing this issue. What would be outside the ansible installation directory?
By the way, here is the output I see when I run source hacking/env-setup. Are the “no previously-included directories found” statements errors, or just informational?
$ source hacking/env-setup
running egg_info
creating lib/ansible.egg-info
writing requirements to lib/ansible.egg-info/requires.txt
writing lib/ansible.egg-info/PKG-INFO
writing top-level names to lib/ansible.egg-info/top_level.txt
writing dependency_links to lib/ansible.egg-info/dependency_links.txt
writing manifest file ‘lib/ansible.egg-info/SOURCES.txt’
reading manifest file ‘lib/ansible.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘v2’
no previously-included directories found matching ‘docsite’
no previously-included directories found matching ‘ticket_stubs’
no previously-included directories found matching ‘packaging’
no previously-included directories found matching ‘test’
no previously-included directories found matching ‘hacking’
no previously-included directories found matching ‘lib/ansible/modules/core/.git’
no previously-included directories found matching ‘lib/ansible/modules/extras/.git’
writing manifest file ‘lib/ansible.egg-info/SOURCES.txt’
The problem is that my system had another installation of Ansible on it. I asked pip to uninstall it for me, and now Ansible playbooks and ad-hoc commands are working again.