Skip to content

Commit

Permalink
If the sequence in facts and settings is different
Browse files Browse the repository at this point in the history
If the sequence in facts and settings is different
exampe:
[ 'gst02:/opt/share', 'gst03:/opt/share', 'gst01:/opt/share'] !=
[ 'gst01:/opt/share', 'gst02:/opt/share', 'gst03:/opt/share']
but in fact they are equal
  • Loading branch information
VictorPavlushin authored Dec 28, 2023
1 parent 7405b17 commit 2567f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
if $ensure == 'present' {
# our fact lists bricks comma-separated, but we need an array
$vol_bricks = split( $facts["gluster_volume_${title}_bricks"], ',')
if $bricks != $vol_bricks {
if $bricks.sort != $vol_bricks.sort {
# this resource's list of bricks does not match the existing
# volume's list of bricks
$new_bricks = difference($bricks, $vol_bricks)
Expand Down

0 comments on commit 2567f5d

Please sign in to comment.