Yeah, ansible should *NOT* install docker dependencies as part of the pip
package, as we don't require docker unless someone wants to use docker, so
module dependencies in docker are soft, and these things quickly snowball
(and we'd be run out of town if we did that).

These are things we typically report at runtime and are noted as
dependencies on the individual module pages.

What you have with a pip task is a good way to go.

"If the requirements metadata was exposed, couldn't we have something like
this"

Somewhat, though in ansible it's unclear when a task is executed because it
may depend on variables that occur at runtime, and sometimes folks won't
want to get docker-py from pip.  We try to avoid implicit auto-installs
except in a few cases, like the apt module needing python-apt, which is
fairly chicken-egg, so it will take care of it.





On Thu, Sep 4, 2014 at 1:58 PM, Matt Hughes <[email protected]> wrote:

> Recently got the Ansible docker module working after I learned that it
> requires the 'docker-py' module installed *on the server*.  It took me a
> while to figure this out.
>
> I was going to put a PR together that clarify this for others, but 1) not
> sure where to put it and 2) couldn't this be automated?  The docker module
> has this in the documentation:
>
> requirements: [ "docker-py >= 0.3.0", "docker >= 0.10.0" ]
>
> So to address this, all I had to do was add the pip task to my playbook:
>
>     - name: Install Docker-py
>       pip: name=docker-py
>     - name: run nginx
>       docker: image=nginx name=nginx ports=443:80
>
> If the requirements metadata was exposed, couldn't we have something like
> this
>
>     - name: run nginx
>       docker: image=nginx name=nginx ports=443:80
>       install_deps: true
>
> That would automatically just install any pip requirements of the module?
> Forgive me if something like this already exists.
>
> --
> 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/9d9104fc-d5c8-4cb9-8b49-7bc26e8baaff%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9d9104fc-d5c8-4cb9-8b49-7bc26e8baaff%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/CA%2BnsWgz%3DcrKMM6CoE_HbJFwR1D47ssZHgEYviOEXbNEcUEaLUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to