From owner-freebsd-questions@FreeBSD.ORG Mon Feb 2 21:32:35 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B09B13B8 for ; Mon, 2 Feb 2015 21:32:35 +0000 (UTC) Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD0A88B for ; Mon, 2 Feb 2015 21:32:35 +0000 (UTC) Received: by mail-pa0-f48.google.com with SMTP id ey11so87370223pad.7 for ; Mon, 02 Feb 2015 13:32:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U5sRupgTLE7fgFtR/Ssfl9Y11H7qU/K5REZ6Bjr/cxc=; b=W85drS8OhWaQYAp1KZ5eYOCwInZISUJYQ7tbMQSsiw6l1LVNAXzcJrlxyyFTu+TEI7 6gRNcAWnyu7mzlgpL0OLrePlGtQf7gy94vybMgTK5hqAINfSWoV4ipQnjDl+sdFRMnbe RBpTv6KS9GUZzJNpkkZwGOoG0kBrkbVWWCWkmpjfG8PuOOXBsoPsg00mWSTeepV/zYKy oI7Z5ATOu5KDOEaalbosJpsxcaHQYRm/aBrJwoabfHTCBHl3vuTByhFA2ZsqKG1JetX/ OY92LiL/tR7zTEiwdg8PG0kVx3oayqeJbl7Gq0Fn+BYtzlbyBrIp7WoVOTkQO6lusuAw 9bJg== MIME-Version: 1.0 X-Received: by 10.66.136.137 with SMTP id qa9mr31751325pab.129.1422912755056; Mon, 02 Feb 2015 13:32:35 -0800 (PST) Received: by 10.70.101.133 with HTTP; Mon, 2 Feb 2015 13:32:35 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Feb 2015 15:32:35 -0600 Message-ID: Subject: Re: Skipping or pre-setting the options in a package installation? (bsdstats) From: Adam Vande More To: Matthew Pherigo Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2015 21:32:35 -0000 On Mon, Feb 2, 2015 at 1:45 PM, Matthew Pherigo wrote: > Hi all, > > I use Ansible to administrate FreeBSD machines, and every time I install a > pkg(8) that prompts for options (like bsdstats, which asks some simple > yes/no questions), the install stops and waits for input that will never > arrive. Though I'm sure that something can be improved about how Ansible > handles this situation, I'm wondering how this can be automated or skipped > in the first place. Perhaps there's an environment variable like > $ALWAYS_ASSUME_YES that chooses the defaults that come with the package > automatically? > > Thanks, > --Matt > You can use expect/autoexpect to automate interactive cli apps. -- Adam