invoking knife in a ruby class

后端 未结 4 1095
迷失自我
迷失自我 2021-02-11 01:38

I\'d like to create a nice wrapper class around knife to allow a program to run knife commands in a readable manner. I\'m currently trying to use the knife.rb file in the chef

4条回答
  •  生来不讨喜
    2021-02-11 02:06

    Knife does parsing itself.

    require 'chef/knife'
    Chef::Knife.run(%w(bootstrap -N chef-n1 --sudo -x dan chef-n1.dan.lan))
    

提交回复
热议问题