Skip to content

Commit 1a8c1cd

Browse files
authored
Merge pull request #215 from scornelissen85/master
Use $fact to retrieve fact
2 parents ae43a34 + 2cff3f1 commit 1a8c1cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manifests/volume.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@
157157
require => Exec["gluster create volume ${title}"],
158158
}
159159
}
160-
} elsif $already_exists {
160+
} elsif $already_exists and "gluster_volume_${title}_bricks" in $facts {
161161
# this volume exists
162162

163163
if $ensure == 'present' {
164164
# our fact lists bricks comma-separated, but we need an array
165-
$vol_bricks = split( getvar( "::gluster_volume_${title}_bricks" ), ',')
165+
$vol_bricks = split( $facts["gluster_volume_${title}_bricks"], ',')
166166
if $bricks != $vol_bricks {
167167
# this resource's list of bricks does not match the existing
168168
# volume's list of bricks

0 commit comments

Comments
 (0)