Skip to content

Commit 5d5c8a5

Browse files
Fix idempotency issues with non-HTTP IIS site bindings
Sites using non-HTTP protocols (net.pipe, net.tcp, net.msmq, msmq.formatname) were reapplied on every Puppet run due to unreliable sorting and hash order sensitivity in binding comparison. Replace custom sorting with set-based comparison to ensure identical bindings are recognized regardless of array order or hash property order. Resolves: Continuous configuration drift for non-HTTP protocol bindings
1 parent 6cecc85 commit 5d5c8a5

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

lib/puppet/type/iis_site.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
require_relative '../../puppet_x/puppetlabs/iis/property/hash'
66
require_relative '../../puppet_x/puppetlabs/iis/property/path'
77
require_relative '../../puppet_x/puppetlabs/iis/property/authenticationinfo'
8-
require_relative '../../puppet_x/puppetlabs/iis/bindings'
98

109
Puppet::Type.newtype(:iis_site) do
1110
@doc = "Allows creation of a new IIS Web Site and configuration of site
@@ -156,17 +155,8 @@ def insync?(is)
156155
value
157156
end
158157

159-
def should
160-
PuppetX::PuppetLabs::IIS::Bindings.sort_bindings(super)
161-
end
162-
163-
def should=(values)
164-
super
165-
@should = PuppetX::PuppetLabs::IIS::Bindings.sort_bindings(@should)
166-
end
167-
168158
def insync?(is)
169-
PuppetX::PuppetLabs::IIS::Bindings.sort_bindings(is) == should
159+
(is || []).to_set == (should || []).to_set
170160
end
171161
end
172162

lib/puppet_x/puppetlabs/iis/bindings.rb

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)