# Apt installs failing on Debian Wheezy.

**URL:** <https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201>\
**Category:** Ansible Project\
**Created:** [July 26, 2013, 3:47pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201 "2013-07-26T15:47:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Grasty](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@John\_Grasty](https://forum.ansible.com/u/John_Grasty)\
**Post date:** [July 26, 2013, 3:47pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/1 "2013-07-26T15:47:57Z")

</div>

Hi,

I love the concept of Ansible, and I seem to be getting it down. I have run into one snag. I was attempting to install iptables-persistent via the apt module, and it failed with this error:

msg: 'apt-get install ‘iptables-persistent’ ’ failed: iptables-persistent failed to preconfigure, with exit status 1  
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also ran into this error when attempting to install fail2ban. I have tried it as root and as a sudo user.

Any help would be appreciated.

Thanks for the great product!

Thanks,  
John Grasty

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 26, 2013, 3:54pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/2 "2013-07-26T15:54:25Z")

</div>

Quick question – does it work normally from apt-get install on the command line of the same system?

---

<div class="post-metadata">

**Author:** ![John\_Grasty](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@John\_Grasty](https://forum.ansible.com/u/John_Grasty)\
**Post date:** [July 26, 2013, 4:15pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/3 "2013-07-26T16:15:33Z")

</div>

Well, never mind. 😃

I just did a fresh install of the OS on my VPS, and it failed from the command line as well. Sorry for the trouble, and thanks for the quick response.

Thanks,  
John Grasty

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [July 26, 2013, 4:40pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/4 "2013-07-26T16:40:04Z")

</div>

​Which means apt has interactive questions it need to ask, which you can  
preconfigure (dpkg-reconfigure)

Serge

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 26, 2013, 6:29pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/5 "2013-07-26T18:29:33Z")

</div>

And Ansible is already sending the “don’t be interactive” flags so it sounds like an issue with the package?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [July 26, 2013, 6:44pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/6 "2013-07-26T18:44:14Z")

</div>

some packages will mandate a config even if you say ‘non interactive’, this is where preseeds and dpkg-reconfigure come in handy.

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [July 26, 2013, 6:53pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/7 "2013-07-26T18:53:27Z")

</div>

​+1 for approving a module on this; this has been a discussion more than  
once IIRC?​

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [July 26, 2013, 6:55pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/8 "2013-07-26T18:55:17Z")

</div>

on my list, closer now, probably will give a stab on it this weekend if my current modules are bug free (i can dream!).

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 26, 2013, 6:57pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/9 "2013-07-26T18:57:40Z")

</div>

There has, I will remove my RHT-induced bias against the poor Debian installer system and approve it if submitted and reasonably decent 🙂

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [July 26, 2013, 7:04pm UTC](https://forum.ansible.com/t/apt-installs-failing-on-debian-wheezy/13201/10 "2013-07-26T19:04:35Z")

</div>

​Seems there is still hope for you :-p​
