# ansible\_ssh\_args not cleared through Inventory file entry

**URL:** <https://forum.ansible.com/t/ansible-ssh-args-not-cleared-through-inventory-file-entry/19306>\
**Category:** Ansible Project\
**Created:** [September 19, 2015, 4:50pm UTC](https://forum.ansible.com/t/ansible-ssh-args-not-cleared-through-inventory-file-entry/19306 "2015-09-19T16:50:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr\_Mark\_A\_Friedman](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@Dr\_Mark\_A\_Friedman](https://forum.ansible.com/u/Dr_Mark_A_Friedman)\
**Post date:** [September 19, 2015, 4:50pm UTC](https://forum.ansible.com/t/ansible-ssh-args-not-cleared-through-inventory-file-entry/19306/1 "2015-09-19T16:50:18Z")

</div>

I have installed the latest version of ansible by cloning the source:

sandman(maf):~:667:$ ansible --version  
ansible 2.0.0 (devel 05f6e76407) last updated 2015/09/19 12:16:52 (GMT -400)  
lib/ansible/modules/core: (detached HEAD 59afecace4) last updated 2015/09/19 12:16:58 (GMT -400)  
lib/ansible/modules/extras: (detached HEAD dee690d7f4) last updated 2015/09/19 12:17:02 (GMT -400)  
config file =  
configured module search path = None

I am running Python 2.6.6 with Debian squeeze.

Running ansible the first time gives me:

sandman(maf):~:661:$ ansible all -m ping  
mmm | FAILED! =\> {  
“failed”: true,  
“msg”: “ERROR! using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE\_SSH\_ARGS="" (or ssh\_args in [ssh\_connection] section of the config file) before running again”  
}

I update my Inventory file as below:

mmm ansible\_connection=ssh ansible\_ssh\_host=[maestro.knocout.com](http://maestro.knocout.com) ansible\_ssh\_port=22 ansible\_ssh\_user=maf ansible\_ssh\_args=""

I get the same error message running ansible again:

sandman(maf):~:655:$ ansible all -vvv -m ping  
No config file found; using defaults  
\<[maestro.knocout.com](http://maestro.knocout.com)\> ESTABLISH SSH CONNECTION FOR USER: maf  
\<[maestro.knocout.com](http://maestro.knocout.com)\> EXEC ssh -C -tt -q -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/maf/.ansible/cp/ansible-ssh-%h-%p-%r” -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 [maestro.knocout.com](http://maestro.knocout.com) (umask 22 && mkdir -p “$HOME/.ansible/tmp/ansible-tmp-1442679825.67-6473289374010” && echo “$HOME/.ansible/tmp/ansible-tmp-1442679825.67-6473289374010”)  
mmm | FAILED! =\> {  
“failed”: true,  
“msg”: “ERROR! using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE\_SSH\_ARGS="" (or ssh\_args in [ssh\_connection] section of the config file) before running again”  
}

The Inventory file is certainly being accessed as it is picking up the host alias and other information but it is not clearing the ansible\_ssh\_args.

I get the same error when the Inventory file is as below:

mmm ansible\_connection=ssh ansible\_ssh\_host=[maestro.knocout.com](http://maestro.knocout.com) ansible\_ssh\_port=22 ansible\_ssh\_user=maf ansible\_ssh\_args=“”

When I specify some other value for ansible\_ssh\_args in the Inventory file, I get the following error:

mmm ansible\_connection=ssh ansible\_ssh\_host=[maestro.knocout.com](http://maestro.knocout.com) ansible\_ssh\_port=22 ansible\_ssh\_user=maf ansible\_ssh\_args=“ControlPersist=60s”

sandman(maf):~:657:$ ansible all -vvv -m ping  
No config file found; using defaults  
\<[maestro.knocout.com](http://maestro.knocout.com)\> ESTABLISH SSH CONNECTION FOR USER: maf  
\<[maestro.knocout.com](http://maestro.knocout.com)\> EXEC ssh -C -tt -q ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 [maestro.knocout.com](http://maestro.knocout.com) (umask 22 && mkdir -p “$HOME/.ansible/tmp/ansible-tmp-1442680096.76-134194356604434” && echo “$HOME/.ansible/tmp/ansible-tmp-1442680096.76-134194356604434”)  
An exception occurred during task execution. The full traceback is:  
Traceback (most recent call last):  
File “/home/maf/opt/ansible/lib/ansible/executor/process/worker.py”, line 122, in run  
executor\_result = TaskExecutor(host, task, job\_vars, new\_play\_context, self.\_new\_stdin, self.\_loader, shared\_loader\_obj).run()  
File “/home/maf/opt/ansible/lib/ansible/executor/task\_executor.py”, line 120, in run  
res = self.\_execute()  
File “/home/maf/opt/ansible/lib/ansible/executor/task\_executor.py”, line 341, in \_execute  
result = self.\_handler.run(task\_vars=variables)  
File “/home/maf/opt/ansible/lib/ansible/plugins/action/normal.py”, line 26, in run  
results = self.\_execute\_module(tmp=tmp, task\_vars=task\_vars)  
File “/home/maf/opt/ansible/lib/ansible/plugins/action/ **init**.py”, line 357, in \_execute\_module  
tmp = self.\_make\_tmp\_path()  
File “/home/maf/opt/ansible/lib/ansible/plugins/action/ **init**.py”, line 173, in \_make\_tmp\_path  
result = self.\_low\_level\_execute\_command(cmd, None, sudoable=False)  
File “/home/maf/opt/ansible/lib/ansible/plugins/action/ **init**.py”, line 463, in \_low\_level\_execute\_command  
rc, stdin, stdout, stderr = self.\_connection.exec\_command(cmd, tmp, in\_data=in\_data, sudoable=sudoable)  
File “/home/maf/opt/ansible/lib/ansible/plugins/connection/ssh.py”, line 318, in exec\_command  
raise e  
TypeError: execv() arg 2 must contain only strings

mmm | FAILED! =\> {  
“failed”: true,  
“stdout”: “”  
}

Any suggestions on what I might do to fix the problem?

Thanks
