Skip to content

Commit

Permalink
Sort all array facts
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-hugo committed May 17, 2017
1 parent d262236 commit fd8d698
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/facter/gluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@
if peer_count > 0
Facter.add(:gluster_peer_list) do
setcode do
peer_list
peer_list.sort
end
end

unless volume_bricks.empty?
Facter.add(:gluster_volume_list) do
setcode do
volume_bricks.keys
volume_bricks.keys.sort
end
end
volume_bricks.each do |vol, bricks|
Facter.add("gluster_volume_#{vol}_bricks".to_sym) do
setcode do
bricks
bricks.sort
end
end
end
Expand All @@ -78,7 +78,7 @@
volume_options.each do |vol, opts|
Facter.add("gluster_volume_#{vol}_options".to_sym) do
setcode do
opts
opts.sort
end
end
end
Expand All @@ -87,7 +87,7 @@
volume_ports.each do |vol, ports|
Facter.add("gluster_volume_#{vol}_ports".to_sym) do
setcode do
ports
ports.sort
end
end
end
Expand Down

0 comments on commit fd8d698

Please sign in to comment.