is there a way to use Chef methods like "yum_package" in a ruby script, executed by standard ruby environment and not in a chef cookbook?
I try to install and remove yum packages in a ruby script and i was thinking about using the methods chef is offering in cookbooks. Chef is already installed on the system.
What i tried is:
require "/opt/chef/embedded/apps/chef/lib/chef.rb"
Chef::Resource::YumPackage.property("vim","7.4.160")
Chef::Resource::YumPackage.action(:install)
I am a beginner in ruby and not sure if i am on the right way. Have somebody tried to use chef Methods in Ruby before? I hope you could help me out with that Problem.
Thanks Til