From 2567f5d49486637b99001ed68b76efe323211949 Mon Sep 17 00:00:00 2001 From: Victor Pavlushin <41314137+VictorPavlushin@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:05:26 +0700 Subject: [PATCH] If the sequence in facts and settings is different 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 --- manifests/volume.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/volume.pp b/manifests/volume.pp index 5c30f5a..4011b0a 100644 --- a/manifests/volume.pp +++ b/manifests/volume.pp @@ -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)