我依靠Librarian-puppet在一个流浪盒中安装rabbitmq。
Puppet版本是3.4.0
我的Puppetfile
包含
forge "http://forge.puppetlabs.com"
[...]
mod 'rabbitmq', :git => 'git://github.com/puppetlabs/puppetlabs-rabbitmq'
通过遵循文档,我打算使用下一条指令安装RabbitMQ服务器:
class { '::rabbitmq':
service_manage => false,
port => '5672',
delete_guest_user => true,
}
通过这样做,我遇到了以下错误消息:
Error: Illegal name. The given name _cluster_nodes does not conform to the naming rule
\A((::)?[a-z0-9]w*)(::[a-z0-9]w*)*\z at
/etc/puppet/modules/rabbitmq/manifests/config.pp:45:5
Error: Illegal name. The given name _cluster_nodes does not conform to the naming rule
\A((::)?[a-z0-9]w*)(::[a-z0-9]w*)*\z at
/etc/puppet/modules/rabbitmq/manifests/config.pp:47:5
实际的config.pp文件包含下一个代码块:
# Handle deprecated option.
if $cluster_disk_nodes != [] {
notify { 'cluster_disk_nodes':
message => 'WARNING: The cluster_disk_nodes is deprecated.
Use cluster_nodes instead.',
}
$_cluster_nodes = $cluster_disk_nodes # line 45
} else {
$_cluster_nodes = $cluster_nodes # line 47
}
有人能为我提供有效的群集节点名称实例吗? 显然用于验证的正则表达式对我来说有点神秘。
我也想知道如何验证_cluster_nodes
值...用于验证的正则表达式来自哪里?
答案 0 :(得分:3)
此问题与变量($cluster_nodes
或$cluster_disk_nodes
)的值无关,而是变量名称不正确。变量名不再以'_'开头(由正则表达式和实际错误消息表示)。我只是迷失在翻译中。
我在github上打开了一个问题,我发送了一个PR,试图修复它:
https://github.com/puppetlabs/puppetlabs-rabbitmq/issues/163
https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/164
为了跟进这个问题,它同样由另一个实际合并的PR解决: