Skip to content

Commit 457e9fc

Browse files
Unordered compare for IIS site bindings for idempotency
1 parent 3998da2 commit 457e9fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/puppet/type/iis_site.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ def should=(values)
166166
end
167167

168168
def insync?(is)
169-
PuppetX::PuppetLabs::IIS::Bindings.sort_bindings(is) == should
169+
# Convert bindings to sets for order-independent comparison
170+
is_set = is.map { |binding| binding.to_s }.to_set
171+
should_set = should.map { |binding| binding.to_s }.to_set
172+
173+
# Compare the sets
174+
is_set == should_set
170175
end
171176
end
172177

0 commit comments

Comments
 (0)