Is there any chance you could try this with the 1.5.4 release, or with the
most up to date devel branch to see if it's still an issue? If so, please
open an issue on github so we can keep track of it.

Thanks!


On Mon, Apr 7, 2014 at 2:42 PM, chris d <chrisd1...@gmail.com> wrote:

> hi everyone,
>
> i'm really digging ansible so far, but I keep running into this one
> strange issue.
>
> I have a couple different roles, and for now they all target the same
> host. In a common role, it ansible uses the apt module to install some apt
> packages like so:
>
> - name: install common apt packages
>   apt: pkg={{ item }} state=installed update_cache=yes
>   with_items: apt_packages
>
> This bit works well, all the packages are installed as I would expect.
>
> Then in another role (which uses a different vars file, so the
> apt_packages variable is different), I have this:
>
> - name: install application server apt packages
>   sudo: yes
>   apt: pkg={{ item }} state=installed
>   with_items: apt_packages
>   notify: install libjpeg
>
>
> Which fails with the following:
> failed: [host] => (item= <<some package names here>>) => {"failed": true,
> "item":
> "libmysqlclient-dev,libmysqlclient18,libjpeg8-dev,libfreetype6-dev,zlib1g-dev,libtiff4-dev"}
>
>
> msg: Could not import python modules: apt, apt_pkg. Please install
> python-apt package.
>
> Which is weird because..
> a) The python-apt module is installed
> b) I just used the ansible apt module in a previous role and it worked
> just fine
> c) running the straight command like this:
>
>  - name: install appserver apt packages
>    sudo: yes
>    command: apt-get install -y libjpeg-dev libfreetype6-dev zlib1g-dev
> libtiff4-dev libjpeg-dev libmysqlclient-dev
>
> works fine. But I'd like to use the ansible apt module in order to get the
> notify functionality to work so i don't have to rebuild libjpeg every time
> (ugly python/ubuntu/PIL bug workaround...don't ask :) )
>
> If anyone sees anything that I'm doing wrong, let me know...I'm pretty new
> to ansible so it may be obvious. This is using ansible 1.4.3 and ubuntu
> 12.04 and python 2.7.
>
> Thanks!
>
>
>
>  --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/740314b4-c0fd-4056-ace4-8559a96e3999%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/740314b4-c0fd-4056-ace4-8559a96e3999%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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFg%2Bn8TjrnxKg8%3D4EH4HkTigwe-TOv8Zb3ye9_fPTDzBnxuW_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to