Skip to content

Commit 4bd54dc

Browse files
committed
Refactor volume options fact as array
Volume options are stored as comma separated string, the only use from the gluster module is in volume.pp, there it is converted back to an array using split(). Some gluster volume options are using commas for splitting values (e.g. auth.allow), this conflicts with this behaviour.
1 parent d0c701c commit 4bd54dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/facter/gluster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
volume_options.each do |vol, opts|
8383
Facter.add("gluster_volume_#{vol}_options".to_sym) do
8484
setcode do
85-
opts.join(',')
85+
opts
8686
end
8787
end
8888
end

manifests/volume.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
# did the options change?
225225
$current_options = getvar("gluster_volume_${title}_options")
226226
if $current_options {
227-
$_current = sort( split($current_options, ',') )
227+
$_current = sort($current_options)
228228
} else {
229229
$_current = []
230230
}

0 commit comments

Comments
 (0)