apt-get install play suddenly fails

I’ve got this play in my playbook to install mysql-server:

mysql server setup

  • name: Install MySQL Server

apt: pkg={{ item }} state=present update_cache=yes

with_items:

  • mysql-server

environment:

DEBIAN_FRONTEND: noninteractive

This has worked flawlessly for me for some time.

Starting this evening, I began getting errors like:

TASK: [base | Install MySQL Server] *******************************************

failed: [127.0.0.1] => (item=mysql-server) => {“cmd”: [“DEBIAN_FRONTEND=noninteractive”, “DEBIAN_PRIORITY=critical”, “/usr/bin/apt-get”, “-y”, “-o”, “Dpkg::Options::=–force-confdef”, “-o”, “Dpkg::Options::=–force-confold”, “install”, “mysql-server”], “failed”: true, “item”: “mysql-server”, “rc”: 2}

msg: [Errno 2] No such file or directory

I tried upgrading ansible to 1.5.2a-precise-unstable by apt-get. Same problem. OS is ubuntu 12.04

What’s going on?

Thanks.

-D

This should be fixed by 1.5.2

Still seeing the same issue with 1.5.2

Matt

On further investigation, the

environment:

DEBIAN_FRONTEND: noninteractive

seemed to be unnecessary and indeed continued to cause problems even post-patch.

Does that make sense?

The mysql-server deb is particularly horrible as it prompts for user input (root password) at least twice and as many as three times. I found this example which I used successfully prior to 1.5 release:

https://gist.github.com/silviud/6382400

(approving some old first-posts so these may be a bit out of date, but replying to them now)

The 1.5.2 tarball from this AM lacked a git-cherry-pick.

Since then, about 10:50 AM EDT, we rebuild the tarball, moved the git tag, and fixed the problem.

pypi already has the right ansible as does releases.ansible.com

Those using the rquillo PPA may have a mispackaged Ansible 1.5.2, that was actually a 1.5.1, which was a slight oversight on his end I think, but we’re not sure.

We are also looking to hosting a PPA ourselves very soon now.

If anybody is still seeing problems on Ubuntu, install from pip or the tarball, and you will be good to go!

Thanks Michael, that worked!