Skip to content

Commit 4cf63ea

Browse files
author
Tim Windelschmidt
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 972f49a commit 4cf63ea

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
@@ -148,7 +148,7 @@
148148
# Create flat facts for each volume
149149
Facter.add("gluster_volume_#{vol}_options".to_sym) do
150150
setcode do
151-
opts.join(',')
151+
opts
152152
end
153153
end
154154
end

manifests/volume.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
if getvar('::gluster_binary') {
105105
# we need the Gluster binary to do anything!
106106

107-
if getvar('::gluster_volume_list') and member( split( $::gluster_volume_list, ',' ), $title ) {
107+
if getvar('::gluster_volume_list') and member($::gluster_volume_list, $title) {
108108
$already_exists = true
109109
} else {
110110
$already_exists = false

0 commit comments

Comments
 (0)