'Run an apt-get command with all the necessary options for
non-interactive use (DEBIAN_FRONTEND=interactive, -y, --force-yes, etc)'

def apt_command(self, cmd):

    dpkg_opts = "Dpkg::Options::='--force-confnew'"
    cmd = ('apt-get    -o    %s    -y    --force-yes    %s' % (dpkg_opts, cmd))
    cmd = ("DEBIAN_FRONTEND='noninteractive'    " + cmd)
    self.ssh.execute(cmd)
