Hi, I'm trying to do something a bit strange, so just say if I'm doing it wrong ;)
I'm trying to keep a file off the puppet clients, but have the data available at run time. In this case it's a key for an encrypted volume I'm having Puppet set up. To accomplish that I'm trying to use the fileserver client to grab the data as needed, the code currently looks like this: begin uri = URI.parse(URI.escape(source)) rescue => detail self.fail "Could not understand source %s: %s" % [source, detail.to_s] end case uri.scheme when "puppet": host = uri.host host ||= Puppet[:server] args = { :Server => host } if uri.port then args[:Port] = uri.port end server = Puppet::Network::Client.file.new(args) begin contents = server.retrieve(uri.path, :ignore) return contents rescue => detail self.fail "Could not retrieve key from path %s %s: %s" % [host, uri.path, detail] end end self.fail "Could not retrieve key" but when I run it I get Puppet::Network::XMLRPCClientError: Name and IP must be passed to 'allowed?' so I must be missing an authentication step somewhere, but the File type doesn't have any clues. Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---