File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -240,16 +240,18 @@ def self.title_patterns
240240 end
241241
242242 validate do
243- unless value ( :certificate ) || value ( :certificate_content )
244- raise Puppet ::Error , "You must pass one of 'certificate' or 'certificate_content'"
245- end
243+ if self [ :ensure ] != :absent
244+ unless value ( :certificate ) || value ( :certificate_content )
245+ raise Puppet ::Error , "You must pass one of 'certificate' or 'certificate_content'"
246+ end
246247
247- if value ( :certificate ) && value ( :certificate_content )
248- raise Puppet ::Error , "You must pass either 'certificate' or 'certificate_content', not both."
249- end
248+ if value ( :certificate ) && value ( :certificate_content )
249+ raise Puppet ::Error , "You must pass either 'certificate' or 'certificate_content', not both."
250+ end
250251
251- if value ( :private_key ) && value ( :private_key_content )
252- raise Puppet ::Error , "You must pass either 'private_key' or 'private_key_content', not both."
252+ if value ( :private_key ) && value ( :private_key_content )
253+ raise Puppet ::Error , "You must pass either 'private_key' or 'private_key_content', not both."
254+ end
253255 end
254256
255257 if value ( :password ) && value ( :password_file )
You can’t perform that action at this time.
0 commit comments