我依靠图书管理员木偶在一个流浪箱里安装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
值…用于验证的正则表达式从何而来? 最佳答案
这个问题与变量值($cluster_nodes
或$cluster_disk_nodes
)无关,而是变量名不正确。变量名不能再以“u”开头(由正则表达式和实际错误消息表示)。我刚迷上了翻译。
我在github上打开了一个问题,并发送了一个pr,试图修复它:
https://github.com/puppetlabs/puppetlabs-rabbitmq/issues/163
https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/164
为了跟进这一问题,另一家公关公司也同样解决了这一问题,并将其合并:
https://github.com/puppetlabs/puppetlabs-rabbitmq/pull/160