# Updated ansible to track latest, now I have error 'Connection' object has no attribute '\_split\_ssh\_args'

**URL:** <https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684>\
**Category:** Ansible Project\
**Created:** [February 25, 2016, 10:19pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684 "2016-02-25T22:19:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [February 25, 2016, 10:19pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/1 "2016-02-25T22:19:36Z")

</div>

I just git pulled the latest build from GitHub, and then ran the following two commands as recommended on the Installation page:

```auto
$ 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": ""}

```

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [February 26, 2016, 1:38pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/2 "2016-02-26T13:38:59Z")

</div>

Not seen this myself but a couple of things to investigate.

You don’t mention which version of ansible you were running previously - if it wasn’t from a development checkout, ensure you have run

source hacking/env-setup

Probably worth re-running even if you were on a dev checkout before.

Also the ‘ssh’, ‘-tt’ part of the stack trace reminded me of this comment I noticed on a closed issue from a few days ago:

```auto
https://github.com/ansible/ansible/issues/13876#issuecomment-186709690

```

Doesn’t sound like exactly the same issue but perhaps worth a look.

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 9:18pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/3 "2016-03-01T21:18:05Z")

</div>

Hi Jon,

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

action\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/action  
callback\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/callback  
connection\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/connection  
lookup\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/lookup  
vars\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/vars  
filter\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/filter  
test\_plugins = /home/ansibleuser/ansible/lib/ansible/plugins/test

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [March 1, 2016, 10:11pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/4 "2016-03-01T22:11:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:16pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/5 "2016-03-01T22:16:21Z")

</div>

Hi Matt,

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?

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:20pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/6 "2016-03-01T22:20:53Z")

</div>

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’

Setting up Ansible to run out of checkout…

PATH=/home/ansible-user/ansible/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ansible-user/.local/bin:/home/ansible-user/bin  
PYTHONPATH=/home/ansible-user/ansible/lib:  
MANPATH=/home/ansible-user/ansible/docs/man:

Remember, you may wish to specify your host file with -i

Done!

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:52pm UTC](https://forum.ansible.com/t/updated-ansible-to-track-latest-now-i-have-error-connection-object-has-no-attribute-split-ssh-args/20684/7 "2016-03-01T22:52:24Z")

</div>

Okay, so apparently that output is okay.

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.
