Rafaelfc/pear 在 Puppet with Hiera 中

Rafaelfc/pear in Puppet with Hiera

我需要在 Puppet 基础设施中安装带有 PEAR 的 FirePHPCore。

文档给了个例子

include pear
# If no version number is supplied, the latest stable release will be
# installed. In this case, upgrade PEAR to 1.9.2+ so it can use
# pear.drush.org without complaint.
pear::package { "PEAR": }
pear::package { "Console_Table": }

# Version numbers are supported.
pear::package { "drush":
  version => "4.5.0",
  repository => "pear.drush.org",
}

我是这样实现的

classes:
 - pear


pear::package:
 'PEAR':
pear::package:
 'Console_Table':


pear::package:
 'FirePHPCore':
  repository : 'pear.firephp.org'

但是没用。我在代理上看到错误:

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install {"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package {"FirePHPCore"=>{"repository"

Error: /Stage[main]/Pear/Package[{"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install {"FirePHPCore"=>{"repository"=>"pear.firephp.org"}}' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package {"FirePHPCore"=>{"repository"

看起来它将 'FirePHPCore': 解释为 "FirePHPCore"=>

有谁知道哪里出了问题吗?

因此,看起来 Rafaelfc/pear 已损坏,通过 Puppet 安装 pear 模块的最简单方法如下代码所示:

exec { "install FirePHP":
    command => "/usr/bin/pear channel-discover pear.firephp.org && /usr/bin/pear install firephp/FirePHPCore",
    onlyif => "/usr/bin/test  `/usr/bin/pear list -c firephp | grep -c Fire` -eq 0",
  }