-
-
Save hannesfostie/160741e8c6f8cb8c433f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'slop' | |
require 'sock_admin' | |
options = Slop.parse do | |
banner %{Usage: sock_admin COMMAND [OPTIONS] | |
Control Sock from the command line. | |
} | |
on :v, :version, 'Display the version' do | |
puts "SockAdmin Version #{SockAdmin::VERSION}" | |
end | |
command 'chef' do | |
command 'last' do | |
on :h, :host=, "Displays last Chef run for the specified host" | |
run do |options, args| | |
# do stuff | |
end | |
end | |
command 'run' do | |
on :h, :host=, "Runs Chef on the specified host" | |
run do |options, args| | |
# do stuff | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment