On my file system, I have a classpath.txt file, which contains a java 
classpath. The classpath contains wildcards, and I need to remove the 
wildcards, and have it expanded out to list out all the .jar files 
individually.

So, instead of classpath.txt containing:

C:/lib1/*;C:/lib2/*


I Need:

C:/lib1/file_one.jar;C:/lib1/file_two.jar;C:/lib2/file_three.jar


I already have the Ruby code to do this, I just need to somehow get Puppet 
to run this Ruby code.

I figured I would need to create a custom type, which I've called 
"classpath_expander." I would include this type in my manifest like this:

classpath_expander { 'expand classpath.txt':
  path => "C:/temp/classpath.txt"
}


Currently, my type is defined like this:

Puppet::Type.newtype(:classpath_expander) do
  @doc = "Reads the classpass in a file, and expands out any wildcards."

newparam(:name, :namevar => true) do
  desc 'An arbitrary name used as the identity of the resource.'
end

newparam(:path) do
  desc 'The path to the classpath file.'
end
end



But at this point, I'm not sure where to put my Ruby code. All the 
documentation gives examples on how to use the "ensurable" property; 
however, I'm not sure that makes sense in this case, does it? If so, what 
would I need for each of the "create", "destroy", and "exist?" methods? 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to