簡體   English   中英

如何在Puppet清單中的軟件包中添加安裝選項

[英]How to add install option to package in Puppet manifest

在過去的兩天內,我嘗試在由Vagrant創建的Debian 7 x64虛擬機上僅為Nginx安裝兩個模塊。 現在我有這個清單:

package { 'nginx':
  ensure => 'present',
  install_options => [ '--with-http_secure_link_module', '--with-http_image_filter_module' ],
}

include '::apt'

apt::source { 'nginx':
  location   => "http://nginx.org/packages/debian",
  repos      => 'nginx',
  key        => '7BD9BF62',
  key_source => 'http://nginx.org/keys/nginx_signing.key',
  before     => Package['nginx'],
}

#import 'nodes/*.pp'

運行vagrant provision ,我使用vagrant ssh通過ssh進入VM,這是我看到的內容:

vagrant@packer-virtualbox-iso:~$ sudo nginx -V

nginx version: nginx/1.6.2
built by gcc 4.7.2 (Debian 4.7.2-5) 
TLS SNI support enabled
configure arguments: 
--prefix=/etc/nginx 
--sbin-path=/usr/sbin/nginx 
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log  
--http-log-path=/var/log/nginx/access.log
--pid-path=/var/run/nginx.pid  
--lock-path=/var/run/nginx.lock  
--http-client-body-temp-path=/var/cache/nginx/client_temp  
--http-proxy-temp-path=/var/cache/nginx/proxy_temp  
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp  
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp  
--http-scgi-temp-path=/var/cache/nginx/scgi_temp  
--user=nginx
--group=nginx
--with-http_ssl_module
--with-http_realip_module  
--with-http_addition_module
--with-http_sub_module
--with-http_dav_module  
--with-http_flv_module
--with-http_mp4_module
--with-http_gunzip_module  
--with-http_gzip_static_module
--with-http_random_index_module  
--with-http_secure_link_module
--with-http_stub_status_module  
--with-http_auth_request_module
--with-mail
--with-mail_ssl_module
--with-file-aio
--with-http_spdy_module
--with-cc-opt='-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' 
--with-ld-opt='-Wl,-z,relro -Wl,--as-needed'
--with-ipv6**

image_filter模塊尚未安裝,但是secure_link可以(我認為可以,因為默認情況下已安裝)。

那我在做什么錯?

正如Felix提到的,Puppet中的package資源不是用於編譯軟件包,而是用於管理安裝和卸載軟件包。

如果要編譯特定於nginx Debian軟件包的選項或添加項,建議使用fpm-cookery 有一個示例nginx配方可能對您有用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM