Could you do an md5sum on the module? It should be located 
at /usr/share/ansible/packaging/apt and should match the following:

$ md5sum /usr/share/ansible/packaging/apt
7b3796da213ba4a5affab8413e7579d2  /usr/share/ansible/packaging/apt

You might also want to grab the module for that release 
from https://github.com/ansible/ansible/blob/release1.5.4/library/packaging/apt 
and diff them if the MD5's don't match. 

The reason I ask is because the command shown in your output has leading 
environment variables set (ie. DEBIAN_FRONTEND=noninteractive), but as far 
as I can tell from the code in 1.5.4 that had been removed by that point.

Thanks!

On Tuesday, April 8, 2014 3:53:26 AM UTC-5, Jens-Christian Fischer wrote:
>
> I am trying to upgrade all our (ubuntu) servers with the following 
> playbook:
>
> - hosts: all
>   serial: 2
>
>   tasks:
>     - name: apt-get update
>       apt: update_cache=yes
>
>     - name: apt-get dist-upgrade
>       apt: upgrade=dist dpkg_options='force-confold,force-confdef'
>
>     - name: reboot
>       command: '/sbin/reboot'
>
>
> This fails like so:
>
> TASK: [apt-get dist-upgrade] 
> **************************************************
> <10.0.20.4> REMOTE_MODULE apt upgrade=dist 
> dpkg_options='force-confold,force-confdef'
> <10.0.20.67> REMOTE_MODULE apt upgrade=dist 
> dpkg_options='force-confold,force-confdef'
> failed: [10.0.20.4] => {"cmd": ["DEBIAN_FRONTEND=noninteractive", 
> "DEBIAN_PRIORITY=critical", "/usr/bin/apt-get", "-y", "-o", 
> "Dpkg::Options::=--force-confold", "-o", "Dpkg::Options::=--force-confdef", 
> "dist-upgrade"], "failed": true, "rc": 2}
> msg: [Errno 2] No such file or directory
>
> The command runs fine if I run it as root on the machine itself:
>
>    'DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical 
> /usr/bin/apt-get -y -o Dpkg::Options::=--force-confold -o 
> Dpkg::Options::=--force-confdef dist-upgrade'
>
> Using that command line in a ansible 'command' or 'shell' statement 
> instead of the apt command produces exactly the same error.
>
> Any ideas?
>
> cheers
> Jens-Christian
>

-- 
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/0aa93f18-3668-4d62-b814-b2b56795791e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to