# v1.2.2 "Invalid argument" Bug

**URL:** <https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083>\
**Category:** Ansible Project\
**Created:** [July 8, 2013, 6:14pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083 "2013-07-08T18:14:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Ferrante](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Matt\_Ferrante](https://forum.ansible.com/u/Matt_Ferrante)\
**Post date:** [July 8, 2013, 6:14pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/1 "2013-07-08T18:14:53Z")

</div>

Hello,  
I have a jenkins job that installs to a Ansible to a virtual environment using `pip install ansible` then runs ansible-playbook like `ansible-playbook -v -i my_host_file my_playbook.yml`. On 7/5, the execution of ansible-playbook started failing with the following error:

```auto
GATHERING FACTS *************************************************************** 
fatal: [ui.test.net] => {'msg': "FAILED: (22, 'Invalid argument')", 'failed': True}

```

```auto

```

This error appeared on the first task that ran - if I set gather\_facts: no, it would fail on the first task. I was only able to reproduce this in Jenkins. The host is connectable from the Jenkins machine where the script ran.

The version of ansible installed was 1.2.2. I modified my install script to install from the git repository - `pip install git+git://github.com/ansible/ansible.git@release1.2#egg=ansible` and the problem went away.

I thought I would share my findings. Has anyone else experienced this issue?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 8, 2013, 6:33pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/2 "2013-07-08T18:33:15Z")

</div>

What OS is this?

Do you have anything set for ssh\_args in ansible.cfg ?

---

<div class="post-metadata">

**Author:** ![Matt\_Ferrante](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Matt\_Ferrante](https://forum.ansible.com/u/Matt_Ferrante)\
**Post date:** [July 8, 2013, 6:38pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/3 "2013-07-08T18:38:00Z")

</div>

This is running on CentOS 6.3. I don’t have an ansible.cfg file in use.

Below is my host file - the play runs against the user\_interface hosts.

```auto
[skytap_user_interface]
ui.test.net ansible_ssh_host=192.169.172.1 

 
[skytap_user_interface:vars]
cic_db_name=user_interface_database
cic_db_host=127.0.0.1

 
 
[user_interface]

```

```auto

```

```auto
[user_interface:children]
skytap_user_interface

```

```auto

```

```auto

```

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 8, 2013, 6:57pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/4 "2013-07-08T18:57:04Z")

</div>

Can you paste the output from when you are running with “-v -v -v” ?

---

<div class="post-metadata">

**Author:** ![Matt\_Ferrante](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Matt\_Ferrante](https://forum.ansible.com/u/Matt_Ferrante)\
**Post date:** [July 8, 2013, 7:20pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/5 "2013-07-08T19:20:45Z")

</div>

```auto
+ ansible-playbook -v -v -v -i skytap_ui_hosts ansible/user_interface_test.yml

PLAY [user_interface] ********************************************************* 

GATHERING FACTS *************************************************************** 
<192.169.7.1> ESTABLISH CONNECTION FOR USER: dataxu on PORT 22 TO 192.169.7.1
fatal: [ui.test.net] => {'msg': "FAILED: (22, 'Invalid argument')", 'failed': True}

```

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 8, 2013, 7:25pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/6 "2013-07-08T19:25:08Z")

</div>

Hmm.

I run a lot of tests on CentOS 6.3.

This is probably not enough for me to reproduce it, unfortunately.

Since you are using CentOS, however, I might suggest installing from EPEL.

---

<div class="post-metadata">

**Author:** ![Matt\_Ferrante](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Matt\_Ferrante](https://forum.ansible.com/u/Matt_Ferrante)\
**Post date:** [July 8, 2013, 7:35pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/7 "2013-07-08T19:35:46Z")

</div>

I have only been able to reproduce it when running in a Jenkins job.

I should have been installing a specified version anyway, so my solution works well. I just wasn’t sure if anyone else had seen it.

Thanks for the help

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 8, 2013, 8:03pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/8 "2013-07-08T20:03:18Z")

</div>

Since you said this is 1.2.2 and you do not have an ansible.cfg I suspect it is trying to prompt you for a password and there’s no TTY.

Try disabling host key checking in ansible.cfg.

---

<div class="post-metadata">

**Author:** ![Matt\_Ferrante](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@Matt\_Ferrante](https://forum.ansible.com/u/Matt_Ferrante)\
**Post date:** [July 8, 2013, 9:23pm UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/9 "2013-07-08T21:23:26Z")

</div>

That did it - Instead of setting up the ansible.cfg, I set ANSIBLE\_HOST\_KEY\_CHECKING to False before running ansible-playbook. It ran no problem.

```auto
export ANSIBLE_HOST_KEY_CHECKING=False

```

```auto

```

Thanks

---

<div class="post-metadata">

**Author:** ![Naween\_Ghimire](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@Naween\_Ghimire](https://forum.ansible.com/u/Naween_Ghimire)\
**Post date:** [December 3, 2014, 10:27am UTC](https://forum.ansible.com/t/v1-2-2-invalid-argument-bug/13083/10 "2014-12-03T10:27:12Z")

</div>

This helped me too. Thanks.
