Class: Caterer::Command::Lock
- Defined in:
- lib/caterer/command/lock.rb
Instance Attribute Summary
Attributes inherited from Server
Instance Method Summary collapse
Methods inherited from Server
#can_rsync?, #clean, #cleanup!, #config, #data, #detect_platform, #host, #initialize, #key, #keys, #lock, #lock!, #locked?, #name, #password, #platform_script, #port, #prepare!, #provision, #rsync, #run_action, #ssh, #ssh_opts, #ui, #unlock, #unlock!, #upload_directory, #username
Methods included from Util::Shell
#bash, #env, #env_string, #escape, #su
Constructor Details
This class inherits a constructor from Caterer::Server
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/caterer/command/lock.rb', line 5 def execute = {} parser = OptionParser.new do |opts| opts. = "Usage: cater lock HOST [options]" end add_server_opts(parser, ) # Parse the options argv = (parser, true) return if not argv with_target_servers(argv, ) do |server| server.lock end 0 end |