Skip to content

Commit 2cff3f1

Browse files
committed
Use $facts to retrieve fact
1 parent ae43a34 commit 2cff3f1

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)