Skipping or pre-setting the options in a package installation? (bsdstats)

A.J. Kehoe IV (Nanoman) nanoman at
Mon Feb 2 20:14:46 UTC 2015

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?

In the case of BSDstats, you can install it with the default answers selected automatically by setting the environmental variable BATCH to "yes".  To change the default answers, there are environmental variables that you can use:

-----BEGIN QUOTE-----
# The default answer to each of the installation questions is "yes".  You can
# override a questions's default by setting its environment variable to "no".
# Environment Variable      | Question
# --------------------------+------------------------------------------------------------------
# BSDSTATS_MONTHLY_ENABLE   | Would you like to enable monthly reporting in /etc/periodic.conf?
# BSDSTATS_MONTHLY_DEVICES  | Would you like to send a list of installed hardware as well?
# BSDSTATS_MONTHLY_PORTS    | Would you like to send a list of installed ports as well?
# BSDSTATS_MONTHLY_NOW      | Would you like to run it now?
# BSDSTATS_REBOOT_REPORTING | Would you like to enable reporting on bootup in /etc/rc.conf?
-----END QUOTE-----

A.J. Kehoe IV (Nanoman)     |  /"\  ASCII Ribbon Campaign
Nanoman's Company           |  \ /   - No HTML/RTF in E-mail
E-mail: nanoman at  |   X    - No proprietary attachments
WWW: |  / \   - Respect for open standards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3924 bytes
Desc: not available
URL: <>

More information about the freebsd-questions mailing list