# Syntax error in add\_host.py

**URL:** <https://forum.ansible.com/t/syntax-error-in-add-host-py/12379>\
**Category:** Ansible Project\
**Created:** [February 18, 2013, 12:29am UTC](https://forum.ansible.com/t/syntax-error-in-add-host-py/12379 "2013-02-18T00:29:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kavin](https://avatars.discourse-cdn.com/v4/letter/k/ba8739/32.png) [@Kavin](https://forum.ansible.com/u/Kavin)\
**Post date:** [February 18, 2013, 12:29am UTC](https://forum.ansible.com/t/syntax-error-in-add-host-py/12379/1 "2013-02-18T00:29:20Z")

</div>

I just have pulled the upstream changes, and while doing an install get this error:

Anyone else getting it ? Anyways submitted a pulle request #2112

running install\_lib  
byte-compiling /usr/lib/python2.6/site-packages/ansible/runner/action\_plugins/add\_host.py to add\_host.pyc  
SyntaxError: (‘invalid syntax’, (‘/usr/lib/python2.6/site-packages/ansible/runner/action\_plugins/add\_host.py’, 37, 92, ’ def run(self, conn, tmp, module\_name, module\_args, inject, complex\_args=None, \*\*kwargs)\n’))

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [February 18, 2013, 12:55am UTC](https://forum.ansible.com/t/syntax-error-in-add-host-py/12379/2 "2013-02-18T00:55:07Z")

</div>

Yeah I got it, and merged already.

There was a test coverage gap around host, which is tricky to test  
from playbooks anyway.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kavin](https://avatars.discourse-cdn.com/v4/letter/k/ba8739/32.png) [@Kavin](https://forum.ansible.com/u/Kavin)\
**Post date:** [February 18, 2013, 9:20pm UTC](https://forum.ansible.com/t/syntax-error-in-add-host-py/12379/3 "2013-02-18T21:20:13Z")

</div>

I forgot to ask the other question,

When i do $sudo make install , I always get the following error /usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: ‘install\_requires’

Error:

python setup.py install  
DATA FILES=[(‘/usr/share/ansible/’, [‘./library/mysql\_db’, ‘./library/mail’, ‘./library/facter’, ‘./library/seboolean’, ‘./library/mount’, ‘./library/git’, ‘./library/cron’, ‘./library/apt\_repository’, ‘./library/hg’, ‘./library/assemble’, ‘./library/add\_host’, ‘./library/rabbitmq\_vhost’, ‘./library/subversion’, ‘./library/authorized\_key’, ‘./library/pause’, ‘./library/pip’, ‘./library/setup’, ‘./library/user’, ‘./library/ohai’, ‘./library/async\_wrapper’, ‘./library/apt\_key’, ‘./library/selinux’, ‘./library/apt’, ‘./library/mysql\_user’, ‘./library/wait\_for’, ‘./library/fireball’, ‘./library/postgresql\_db’, ‘./library/ini\_file’, ‘./library/get\_url’, ‘./library/async\_status’, ‘./library/easy\_install’, ‘./library/pacman’, ‘./library/lineinfile’, ‘./library/virt’, ‘./library/command’, ‘./library/ec2\_vol’, ‘./library/rabbitmq\_user’, ‘./library/ec2’, ‘./library/debug’, ‘./library/template’, ‘./library/shell’, ‘./library/svr4pkg’, ‘./library/script’, ‘./library/nagios’, ‘./library/zfs’, ‘./library/rabbitmq\_plugin’, ‘./library/slurp’, ‘./library/ping’, ‘./library/service’, ‘./library/mongodb\_user’, ‘./library/fetch’, ‘./library/pkgin’, ‘./library/group’, ‘./library/raw’, ‘./library/supervisorctl’, ‘./library/yum’, ‘./library/uri’, ‘./library/fail’, ‘./library/file’, ‘./library/sysctl’, ‘./library/group\_by’, ‘./library/ec2\_facts’, ‘./library/copy’, ‘./library/postgresql\_user’])]  
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: ‘install\_requires’  
warnings.warn(msg)

Which on my local machine have silenced it by importing setup. Just want to know if its a known issue or an issue with my environment.

$ git diff  
diff --git a/setup.py b/setup.py  
index 00018cc..694a374 100644  
— a/setup.py  
+++ b/setup.py  
@@ -7,6 +7,7 @@ from glob import glob  
sys.path.insert(0, os.path.abspath(‘lib’))  
from ansible import **version** , **author**  
from distutils.core import setup  
+from setuptools import setup

# find library modules

from ansible.constants import DIST\_MODULE\_PATH

Regards,–  
Kavin Kankeshwar

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [February 18, 2013, 9:33pm UTC](https://forum.ansible.com/t/syntax-error-in-add-host-py/12379/4 "2013-02-18T21:33:55Z")

</div>

It's just a warning, you should be fine.
