Skip to content

Commit

Permalink
Use $facts to retrieve fact
Browse files Browse the repository at this point in the history
  • Loading branch information
SndR85 committed Aug 28, 2020
1 parent b78e9f3 commit 2ed2cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@
command => "${::gluster_binary} volume start ${title}",
require => Exec["gluster create volume ${title}"],
}
} elsif $already_exists {
} elsif $already_exists and "gluster_volume_${title}_bricks" in $facts {
# this volume exists

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

0 comments on commit 2ed2cf2

Please sign in to comment.