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 f60cea4 commit 0c2a152
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 @@ -61,28 +61,28 @@
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
if volume_options
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 @@ -91,7 +91,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 0c2a152

Please sign in to comment.