mattmakai / underwear

Dead simple LAMP-stack deployments for Python-powered web applications.
http://underwear.rtfd.org/
MIT License
415 stars 49 forks source link

Ansible: No module named template #6

Open naphthalene opened 8 years ago

naphthalene commented 8 years ago

My Environment:

Python 2.7.10 Ubuntu 15.10 pip 8.1.0

Installed underwear via pip install underwear

Traceback:

$ python manage.py deploy                                                                                                                                              1 ↵
Traceback (most recent call last):
  File "manage.py", line 13, in <module>
    execute_from_command_line(sys.argv)
  File "<scrubbed>/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "<scrubbed>/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "<scrubbed>/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 195, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "<scrubbed>/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 39, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "<scrubbed>/local/lib/python2.7/site-packages/underwear/management/commands/deploy.py", line 3, in <module>
    from underwear.run_underwear import deploy
  File "<scrubbed>/local/lib/python2.7/site-packages/underwear/run_underwear.py", line 17, in <module>
    import ansible.utils.template
ImportError: No module named template
underwear==0.4.5
  - ansible [installed: 2.0.1.0]
    - paramiko [installed: 1.16.0]
      - ecdsa [required: >=0.11, installed: 0.13]
      - pycrypto [required: >=2.1, installed: 2.6.1]
    - setuptools
    - PyYAML [installed: 3.11]
    - pycrypto [required: >=2.6, installed: 2.6.1]
    - jinja2 [installed: 2.8]
      - MarkupSafe [installed: 0.23]
naphthalene commented 8 years ago

I downgraded to ansible==1.9.4 and the problem went away - perhaps a version specifier needs to be added? 2.x probably has breaking changes.

naphthalene commented 8 years ago

I was able to get both this and the other issue resolved by capping the ansible version at 1.8.4.