Hi, I am trying out ansible-container to orchestrate containers on a k8s 
cluster..
I am seeing the below error during the shipit stage:

Any help will be appreciated ...

#ansible-container --debug shipit kube --pull-from <registry>

Cleaning up temporary directory /tmp/tmpsX8ySy...
Creating role path 
/<ansible_directory>/example/ansible/roles/example-kubernetes
Rendering template for test/test.j2.yml
shipit_role/test.j2.yml
Traceback (most recent call last):
  File 
"/usr/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/cli.py",
 
line 154, in commandline
    getattr(engine, u'cmdrun_{}'.format(args.subcommand))(**vars(args))
  File 
"/usr/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/engine.py",
 
line 337, in cmdrun_shipit
    shipit_engine_obj.run()
  File 
"/usr/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/shipit/kubernetes/engine.py",
 
line 28, in run
    self.init_role()
  File 
"/usr/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/shipit/base_engine.py",
 
line 139, in init_role
    **context)
  File 
"/usr/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/utils.py",
 
line 68, in jinja_render_to_temp
    j2_tmpl = j2_env.get_template(template_file)
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 
812, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 
774, in _load_template
    cache_key = self.loader.get_source(self, name)[1]
  File "/usr/lib64/python2.7/site-packages/jinja2/loaders.py", line 187, in 
get_source
    raise TemplateNotFound(template)
TemplateNotFound: shipit_role/test.j2.yml


On Wednesday, June 8, 2016 at 3:14:08 AM UTC+5:30, mike hepburn wrote:
>
> thanks vincent, that fixed it for me.
>
> i also needed recent version of docker-py
>
> pip install -U docker-py=1.7.1
>
> to avoid:
>
> ImportError: cannot import name create_ipam_config
> https://github.com/docker/compose/issues/2792
>
> Thanks
> Mike
>
> On Tuesday, June 7, 2016 at 11:26:19 PM UTC+10, Vincent Van der Kussen 
> wrote:
>>
>> Hi Mike, 
>>
>> take a look at this: 
>>
>>
>> https://github.com/ansible/ansible-container/commit/6856643b49a40d0b057ea43b42a97837a1e5a2c4
>>
>> Vincent
>>
>> On Tue, Jun 7, 2016 at 11:22 AM, mike hepburn <[email protected]> wrote:
>>
>>> hi greg - any idea why i would get this error when running 
>>> ansible-container build from the test directory ?
>>>
>>> "ImportError: No module named docker.engine"
>>>
>>> tried this on ubuntu @ fedora - same issue.
>>>
>>> Cheers
>>> Mike
>>>
>>>  
>>>
>>>> root@base:~/ansible-container/test# ansible-container --debug build
>>>>>
>>>>> No module named docker.engine
>>>>>
>>>>> Traceback (most recent call last):
>>>>>
>>>>>   File 
>>>>>> "/usr/local/lib/python2.7/dist-packages/ansible_container-0.1-py2.7.egg/container/cli.py",
>>>>>>  
>>>>>> line 164, in commandline
>>>>>
>>>>>     **vars(args))
>>>>>
>>>>>   File 
>>>>>> "/usr/local/lib/python2.7/dist-packages/ansible_container-0.1-py2.7.egg/container/engine.py",
>>>>>>  
>>>>>> line 210, in cmdrun_build
>>>>>
>>>>>     engine_obj = load_engine(engine, base_path)
>>>>>
>>>>>   File 
>>>>>> "/usr/local/lib/python2.7/dist-packages/ansible_container-0.1-py2.7.egg/container/utils.py",
>>>>>>  
>>>>>> line 113, in load_engine
>>>>>
>>>>>     mod = importlib.import_module('container.%s.engine' % engine_name)
>>>>>
>>>>>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
>>>>>> import_module
>>>>>
>>>>>     __import__(name)
>>>>>
>>>>> ImportError: No module named docker.engine
>>>>>
>>>>>
>>>  
>>>
>>>> root@base:~/ansible-container/test# docker-compose -v
>>>>>
>>>>> docker-compose version 1.7.1, build 6c29830
>>>>>
>>>>> root@base:~/ansible-container/test# 
>>>>>
>>>>>
>>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Ansible Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/cfcebfdd-81f8-4b7d-af0a-6fb1f4d33cd2%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ansible-project/cfcebfdd-81f8-4b7d-af0a-6fb1f4d33cd2%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9ce7b113-1c15-4602-8148-12c8f4dd3a9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to