module Vpsb module Tasks class Node < BaseTask include AskSupport PATH = 'bootstrap_server_app_in_do/nodes/' prepare_squence :node_json def call prepare # ip = ask_loop(proc {|r| process(r)}) do # p "What is server ip address (example: 1.23.44.11)?" # end ip = core.get(:do_host_ip) Vpsb::Helpers::FileReplace.replace_json("#{PATH}#{ip}.json",core.get(:node_json)) end private def process(result) return true if result.split('.').length == 4 false end end end end