Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 2014 22:45:51 -0700
From:      Lampros Chaidas <lamproschaidas@aim.com>
To:        freebsd-doc@FreeBSD.org
Subject:   can't find any reference to 'env ASSUME_ALWAYS_YES=YES' for pkg
Message-ID:  <53A9108F.5050406@aim.com>

next in thread | raw e-mail | index | archive | help
Hi there,

I was looking for a way to bootstrap pkg automatically for use with 
Ansible but things like this would fail:

ansible all -m raw -a 'yes | pkg info'
192.168.2.16 | FAILED | rc=1 >>
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:

The problem wasn't Ansible though as I tried the command 'yes | pkg 
info' locally and it still wouldn't work.

After lots of Googling I found this: 
https://dan.langille.org/2013/12/06/bootstrapping-installing-pkg-on-freebsd-unattended-and-without-answering-yes

I tried the following:

ansible all -m raw -a 'env ASSUME_ALWAYS_YES=YES pkg bootstrap'

which worked flawlessly.

Now the issue I have is that I could not find a reference to 'env 
ASSUME_ALWAYS_YES' in either the handbook 
(http://www.freebsd.org/doc/handbook/pkgng-intro.html) or in the man pages:
http://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=7

My questions are:
1. Is there another way of doing this?
2. If not, can a reference/note be added in one of the above mentioned 
pages ? I think this is a pretty important piece of information to be 
left out.

Many thanks,
- Lampros



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A9108F.5050406>