24. Host Plugin (2)
# lib/kondate/host_plugin/file.rb
require 'yaml'
module Kondate
module HostPlugin
class File < Base
# @param [HashWithIndifferentAccess] config
def initialize(config)
super
end
!
def get_environment(host)
ENV['ENVIRONMENT'] || 'development'
end
!
def get_roles(host)
YAML.load_file(@config.path)[host]
end
end
end
end