Class: Vpsb::Tasks::DbPostgresRole

Inherits:
BaseTask
  • Object
show all
Includes:
AskSupport
Defined in:
lib/vpsb/tasks/db_postgres_role.rb

Constant Summary collapse

PATH =
'bootstrap_server_app_in_do/roles/db.json'

Instance Attribute Summary

Attributes inherited from BaseTask

#core, #prepare_squence

Instance Method Summary collapse

Methods included from AskSupport

#ask, #ask_loop, #ask_to_confirm

Methods inherited from BaseTask

#initialize, prepare_squence

Constructor Details

This class inherits a constructor from Vpsb::BaseTask

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/vpsb/tasks/db_postgres_role.rb', line 10

def call
  prepare

  ask_loop(proc {|r| process(r)}) do
    ap preparation_results
    p "Save this configuration y[es]/n[o]?"
  end

  Vpsb::Helpers::FileReplace.replace_json(PATH,core.get(:db_postgres_json))
end