I'm trying to build an Ansible Playbook to deploy some Ubuntu 12.04 servers on Linode, but my problem seems to be an Ubuntu one. When I run different combinations of apt-get or aptitude I always get the following dialog that I have to respond to.
I'd like this to be answered from the command line so that it doesn't interrupt the automatic deployment. Any ideas?
My current commands are below. Note that I'm trying to set DEBIAN_FRONTEND:
#!/bin/bash
echo 'DEBIAN_FRONTEND="noninteractive"' >> /etc/profile
echo 'DEBIAN_FRONTEND="noninteractive"' >> ~/.profile
source /etc/profile
source ~/.profile
# This next line is the one that pops up the dialog
sudo aptitude -y install iptables-persistent
# Need this to fix an issue with the package post-install (this works fine.)
sudo sed \
-i 's/\(modprobe -q ip6\?table_filter\)/\1 || true/g' \
/var/lib/dpkg/info/iptables-persistent.postinst; \
sudo aptitude install iptables-persistent