1

我需要确保 puppet 使用带有“--with-xsl”标志的 LibXML 安装 Php。

对于所有 php,我都有以下类:

class php {
   package { "php5-cli": ensure => present }
   package { "php5-dev": ensure => present }
   package { "php5-mysql": ensure => present }
   package { "php-pear": ensure => present }
   package { "php5-common": ensure => present}
   package { "php5-fpm": ensure => present}
   package { "php5-cgi": ensure => present}
   package { "php-apc": ensure => present}

   exec { "pear upgrade":
     command => "/usr/bin/pear upgrade",
     require => Package["php-pear"],
   }
}

不知道如何在这里使用标志。提前谢谢了。

4

1 回答 1

0

如果你想为所有这些都安装--with-xsl标志,你可以试试这个:

all_php_packages = ["php5-cli","php5-dev","php5-mysql","php-pear",
                    "php5-common","php5-fpm","php5-cgi","php-apc"]

package{ $all_php_packages :
   ensure => present,
   install_options => ["--with-xsl","--some-other-option",],
}
于 2013-09-16T16:33:53.990 回答