我使用puppet管理一堆Debian服务器,其中包括安装软件包。我在多个系统上安装的一个软件包是nmap,用于验证防火墙规则是否正确设置。在Debian 7.0上,如果启用了APT :: Install-Recommends,那么您会得到一堆废话以及nmap(请参见下文)。
我不希望安装所有包含建议启用nmap的废话。一种解决方案是使用来更新我的apt配置APT::Install-Recommends "0";
。但我不想将其设置为默认值。我想推荐的大多数时间都包括在内。推荐的软件包大部分都很好,而且我没有得到很多我不需要的东西。但是有一些软件包带来了我不想要/不需要的东西。
package { 'nmap':
ensure => installed,
require => Class['apt'],
}
使用“ apt”软件包提供程序时,是否有任何方法可以控制是否通过p安装了推荐内容? 我不想弄混aptitude提供商,因为apt和aptitude并不完全兼容。
有推荐
root@fw-01:~# apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
The following NEW packages will be installed:
fonts-droid fonts-liberation ghostscript gnuplot gnuplot-nox groff gsfonts
imagemagick imagemagick-common libblas3 libblas3gf libcroco3 libcupsimage2
libdjvulibre-text libdjvulibre21 libexiv2-12 libgfortran3 libgs9
libgs9-common libijs-0.35 libilmbase6 libjbig2dec0 liblcms1 liblcms2-2
liblensfun-data litesting firewall blensfun0 liblinear-tools liblinear1 liblqr-1-0
libmagickcore5 libmagickcore5-extra libmagickwand5 libnetpbm10 libopenexr6
libpaper-utils libpaper1 librsvg2-2 librsvg2-common libsvm-tools libwmf0.2-7
netpbm nmap poppler-data psutils ufraw-batch
0 upgraded, 45 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.0 MB of archives.
After this operation, 93.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?
没有推荐
root@fw-01:~# apt-get --no-install-recommends install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libblas3 libblas3gf libgfortran3 liblinear1
Suggested packages:
liblinear-dev
Recommended packages:
liblinear-tools
The following NEW packages will be installed:
libblas3 libblas3gf libgfortran3 liblinear1 nmap
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,405 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Do you want to continue [Y/n]?
apt
课了。