Module: Tinychef::Commands
- Defined in:
- lib/tinychef/commands.rb
Instance Method Summary collapse
- #bag_create_command ⇒ Object
- #bag_decrypt_command ⇒ Object
- #bag_encrypt_command ⇒ Object
- #boot_command ⇒ Object
- #key_generate_command ⇒ Object
- #key_lock_command ⇒ Object
- #key_unlock_command ⇒ Object
- #new_command ⇒ Object
- #run_command ⇒ Object
- #secure_command ⇒ Object
- #unsecure_command ⇒ Object
Instance Method Details
#bag_create_command ⇒ Object
14 15 16 17 |
# File 'lib/tinychef/commands.rb', line 14 def bag_create_command recipe = ARGV[1] ; name = ARGV[2] Tinychef::DataBag.new(recipe, name).create end |
#bag_decrypt_command ⇒ Object
24 25 26 27 |
# File 'lib/tinychef/commands.rb', line 24 def bag_decrypt_command recipe = ARGV[1] ; name = ARGV[2] Tinychef::DataBag.new(recipe, name).decrypt end |
#bag_encrypt_command ⇒ Object
19 20 21 22 |
# File 'lib/tinychef/commands.rb', line 19 def bag_encrypt_command recipe = ARGV[1] ; name = ARGV[2] Tinychef::DataBag.new(recipe, name).encrypt end |
#boot_command ⇒ Object
9 10 11 12 |
# File 'lib/tinychef/commands.rb', line 9 def boot_command dest = ARGV[1] ; script = ARGV[2] Tinychef::BootScript.new(dest, script).run end |
#key_generate_command ⇒ Object
37 38 39 |
# File 'lib/tinychef/commands.rb', line 37 def key_generate_command Tinychef::Key.new(ARGV[1]).generate end |
#key_lock_command ⇒ Object
29 30 31 |
# File 'lib/tinychef/commands.rb', line 29 def key_lock_command Tinychef::Key.new(ARGV[1]).password_protect end |
#key_unlock_command ⇒ Object
33 34 35 |
# File 'lib/tinychef/commands.rb', line 33 def key_unlock_command Tinychef::Key.new(ARGV[1]).unlock_and_restore end |
#new_command ⇒ Object
4 5 6 7 |
# File 'lib/tinychef/commands.rb', line 4 def new_command dir_name = ARGV[1] Tinychef::NewDirectory.new(dir_name).create end |
#run_command ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/tinychef/commands.rb', line 47 def run_command = {} [:node] = ARGV[1] if ARGV.size == 3 # assume the destination is not given [:dest] = nil ; [:run_list] = ARGV[2] else [:dest] = ARGV[2] ; [:run_list] = ARGV[3] end Tinychef::NodeRun.new().start end |
#secure_command ⇒ Object
41 42 |
# File 'lib/tinychef/commands.rb', line 41 def secure_command end |
#unsecure_command ⇒ Object
44 45 |
# File 'lib/tinychef/commands.rb', line 44 def unsecure_command end |