But to answer your question, vncservers file is a little different . . . there are two type of lines: 1. contains a space-separated list of port and usernames separated by colons, e.g.: VNCSERVERS="92:gmatz 44:wsmith"
2. contains arguments to be supplied to vncserver, with port number acting as an aray index, e.g.: VNCSERVERARGS[92]="-geometry 1280x1024" VNCSERVERARGS[44]="-geometry 1280x1024" I was hoping to parse the vncserver config file using two different type of record_lines, one for each of the line types . . . thanks, guy On Mon, Sep 19, 2011 at 1:48 PM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Thu, Sep 15, 2011 at 04:22:45PM -0400, Guy Matz wrote: > > hi! Does anyone have any advice on debugging a new custom type? > > > > Any thoughts would be greatly appreciated . . . > > > > BTW, I'm getting the error: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > > Could not render to pson: undefined method `merge' for []:Array > > > > with some very rough code. > > > > The Type (vncserver.rb): > > module Puppet > > newtype(:vncserver) do > > > > ensurable > > > > newproperty(:port) do > [...] > > newproperty(:username) do > [...] > > newproperty(:geometry) do > [...] > > end > > > > The Provider (parsed.rb): > [...] > > record_line :parsed, :fields => %w{vncservers}, :match => > > /^VNCSERVERS="(.*)"/ > > > > end > > > > You have defined three properties (port, username, geometry) but your > provider is not able to retrieve or write any of these properties. So > how does a line in vncservers actually looks like? How can you get port, > username and geometry of a certain vncserver? > > -Stefan > -- 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.