Class: Kitsune::Kit::Commands::SetupSwap
- Inherits:
-
Thor
- Object
- Thor
- Kitsune::Kit::Commands::SetupSwap
- Defined in:
- lib/kitsune/kit/commands/setup_swap.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/kitsune/kit/commands/setup_swap.rb', line 19 def create if Kitsune::Kit::Defaults.system[:disable_swap] say "⚠️ Swap setup is disabled via DISABLE_SWAP=true", :yellow return end = Kitsune::Kit::OptionsBuilder.build( , required: [:server_ip], defaults: Kitsune::Kit::Defaults.system.merge(Kitsune::Kit::Defaults.ssh) ) with_ssh_connection() do |ssh| perform_setup(ssh, ) end end |
#rollback ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/kitsune/kit/commands/setup_swap.rb', line 37 def rollback = Kitsune::Kit::OptionsBuilder.build( , required: [:server_ip], defaults: Kitsune::Kit::Defaults.system.merge(Kitsune::Kit::Defaults.ssh) ) with_ssh_connection() do |ssh| perform_rollback(ssh) end end |