apt-get install play suddenly fails

493 views
Skip to first unread message

Demetri Mouratis

unread,
Mar 11, 2014, 1:03:15 AM3/11/14
to ansible...@googlegroups.com
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

James Tanner

unread,
Mar 11, 2014, 5:34:24 PM3/11/14
to ansible...@googlegroups.com
This should be fixed by 1.5.2 


--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5bd12824-c3aa-4475-865b-c13d19320912%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Maisel

unread,
Mar 11, 2014, 6:21:38 PM3/11/14
to ansible...@googlegroups.com
Still seeing the same issue with 1.5.2

Matt

Demetri Mouratis

unread,
Mar 11, 2014, 7:42:50 PM3/11/14
to ansible...@googlegroups.com

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:

Michael DeHaan

unread,
Mar 11, 2014, 9:34:08 PM3/11/14
to ansible...@googlegroups.com
(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!




Jesús García Crespo

unread,
Mar 12, 2014, 2:26:36 AM3/12/14
to ansible...@googlegroups.com
Thanks Michael, that worked!

On Tue, Mar 11, 2014 at 6:34 PM, Michael DeHaan <mic...@ansible.com> wrote:
If anybody is *still* seeing problems on Ubuntu, install from pip or the tarball, and you will be good to go!

--
Jesús García Crespo
Reply all
Reply to author
Forward
0 new messages