Skip to content

Commit

Permalink
Merge pull request #985 from bastelfreak/puppet82
Browse files Browse the repository at this point in the history
metadata.json: re-add Puppet 8 support
  • Loading branch information
bastelfreak committed May 19, 2024
2 parents ed4d766 + 73d60aa commit 3eb88dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/rabbitmq_cluster/rabbitmqctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create
init_node = @resource[:init_node].to_s.gsub(%r{^.*@}, '')
local_node = @resource[:local_node].to_s.gsub(%r{^.*@}, '')

if local_node == init_node || [Facter.value(:hostname), Facter.value(:fqdn)].include?(init_node)
if local_node == init_node || [Facter.value(:networking)['hostname'], Facter.value(:networking)['fqdn']].include?(init_node)
return rabbitmqctl('set_cluster_name', @resource[:name]) unless cluster_name == resource[:name].to_s
else
rabbitmqctl('stop_app')
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 7.0.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 9.0.0"
}
],
"dependencies": [
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/clustering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it 'runs successfully' do
pp = <<-EOS
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['fqdn'] },
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['networking']['fqdn'] },
config_cluster => true,
cluster_nodes => ['rabbit1', 'rabbit2'],
cluster_node_type => 'ram',
Expand All @@ -28,7 +28,7 @@ class { 'rabbitmq':
it 'runs successfully' do
pp = <<-EOS
class { 'rabbitmq':
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['fqdn'] },
cluster => { 'name' => 'rabbit_cluster', 'init_node' => $facts['networking']['fqdn'] },
config_cluster => true,
cluster_nodes => ['rabbit1', 'rabbit2'],
cluster_node_type => 'ram',
Expand Down
2 changes: 1 addition & 1 deletion templates/rabbitmqadmin.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ssl_cert_file = <%= $rabbitmq::config::ssl_management_cert %>
ssl_key_file = <%= $rabbitmq::config::ssl_management_key %>
port = <%= $rabbitmq::config::ssl_management_port %>
<% unless $rabbitmq::config::management_hostname {-%>
hostname = <%= $networking[fqdn] %>
hostname = <%= $facts['networking']['fqdn'] %>
<% } -%>
<% } else {-%>
port = <%= $rabbitmq::config::management_port %>
Expand Down

0 comments on commit 3eb88dd

Please sign in to comment.