我试图通过木偶安装rabbitmq。我正在使用puppetlabs-rabbitmq模块。它还有用于配置队列和交换的部分,即Native Types
。我无法弄清楚如何使用这些原生类型。
我的rabbitmq安装代码:
class rabbitmq-concrete{
$tools = ["vim-enhanced","mc"]
package { $tools: ensure => "installed" }
$interface = "enp0s8"
$address = inline_template("<%= scope.lookupvar('::ipaddress_${interface}') -%>")
class { 'rabbitmq':
config_cluster => true,
cluster_nodes => ['rml01', 'rml02'],
cluster_node_type => 'disc',
manage_repos => true,
node_ip_address => $address,
erlang_cookie => 'rmq_secret',
}
rabbitmq_exchange { "logging@${node_name}":
type => 'topic',
ensure => present,
}
rabbitmq_queue { "logging@${node_name}":
durable => true,
auto_delete => false,
arguments => {
x-message-ttl => 123,
x-dead-letter-exchange => 'other'
},
ensure => present,
}
rabbitmq_binding { "logging@logging@${node_name}":
destination_type => 'logging',
routing_key => '#',
arguments => {},
ensure => present,
}
}
include rabbitmq-concrete
我收到以下错误:
==> rml01: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type rabbitmq_queue at /tmp/vagrant-puppet-2/manifests/site.pp:35 on node rml01
==> rml01: Wrapped exception:
==> rml01: Invalid resource type rabbitmq_queue
==> rml01: Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type rabbitmq_queue at /tmp/vagrant-puppet-2/manifests/site.pp:35 on node rml01
注意:当我省略这些原生类型时,兔子安装效果很好。
如何使用Native Types
配置rabbitmq_queue
,rabbitmq_exchange
和rabbitmq_binding
?
答案 0 :(得分:2)
您是否有必要的先决条件?您需要Forge中的以下包裹:
puppetlabs / stdlib
stahnma / epel
nanliu / staging
garethr / erlang
在你的清单中我添加了:
include epel
include staging
class { 'erlang': epel_enable => true}
答案 1 :(得分:1)
你的问题是2月13日,但是看看Puppet Forge这些功能只是在3月10日版本5.1.0的最新版本中添加到该模块中。
完整更改日志=&gt; https://forge.puppetlabs.com/puppetlabs/rabbitmq/changelog
删节: &#34; 2015-03-10 - 版本5.1.0
概要 此版本增加了几个功能,以便更灵活地配置rabbitmq,包括一些错误修复,并将puppetlabs-stdlib的最低要求版本提升到3.0.0。
功能
添加rabbitmq_queue和rabbitmq_binding类型&#34;