Hi,
I asked on puppet-users but I think I made a mistake, this seems to me
more like a question for puppet-dev. Sorry if it's not :(
So, to allow me to easier debug my providers, I sometimes wanna use
'command' in my own ruby code.
Trying to figure out how is problem.
This is how I use it inside a provider:
commands :wget => '/usr/bin/wget',
:cp => '/bin/cp'
Later, I can run the command with simple:
wget('http://example.com')
Now, I tried doing this:
something = Puppet::Provider.commands({:wget => '/usr/bin/wget'})
something.wget('http://example.com')
but, I get this:
test.rb:15: undefined method `wget' for {:wget=>"/usr/bin/wget"}:Hash
(NoMethodError)
I also tried running:
wget = Puppet::Provider::Command.new('wget', '/usr/bin/wget',
Puppet::Util, Puppet::Util::Execution)
puts Puppet::Util::Execution.execute(['wget','http://example.com'],{})
but the output is blank...
Any ideas?
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/54133758.8060001%40gmail.com.
For more options, visit https://groups.google.com/d/optout.