# File lib/puppet/ssl/certificate_authority/interface.rb, line 15 15: def apply(ca) 16: unless subjects or method == :list 17: raise ArgumentError, "You must provide hosts or :all when using #{method}" 18: end 19: 20: begin 21: return send(method, ca) if respond_to?(method) 22: 23: (subjects == :all ? ca.list : subjects).each do |host| 24: ca.send(method, host) 25: end 26: rescue InterfaceError 27: raise 28: rescue => detail 29: puts detail.backtrace if Puppet[:trace] 30: Puppet.err "Could not call #{method}: #{detail}" 31: end 32: end