使用puppet安装pgadmin4
我正在尝试使用puppet安装pgadmin4使用puppet安装pgadmin4,puppet,pgadmin-4,Puppet,Pgadmin 4,我正在尝试使用puppet安装pgadmin4 yum::install { 'pgadmin4': ensure => 'present', source => ['https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm', 'https://dl.fedoraproject.org/pub/e
yum::install { 'pgadmin4':
ensure => 'present',
source => ['https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm',
'https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm'
]
}
获取以下错误
parameter 'source' expects a String value, got Tuple
如何传递多个源
我将此作为在centos7上安装pgadmin4的指南
我认为您应该根据错误消息采取行动。参数“source”需要一个字符串值,您正在传递一个元组。因此,我建议您在源参数中传递一个字符串值
yum::install { 'pgadmin4':
ensure => 'present',
source => 'https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm'
}
并在next命令中传递下一个url。我不确定这是否有效,但值得一试。谢谢大家! 我做了一些检查,有充分的理由相信您正在使用该模块。已定义yum::install类 看起来您需要为每个要安装的软件包声明多个yum::install资源 类似的方法可能会奏效:
$pkgs = {
'epel-release' => 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm',
'pgadmin4' => 'https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm',
}
$pkgs.each |$pkg, $source| {
yum::install { $pkg:
ensure => present,
source => $source,
}
}
我们首先需要知道什么是yum::install类,才能知道什么是可能的。我下面的答案很有希望回答你的问题。但是你仍然在传递数组,而不是字符串。