class Kondate::HostPlugin::Base

Attributes

config[R]

Public Class Methods

new(config) click to toggle source

@param [HashWithIndifferentAccess] config

# File lib/kondate/host_plugin/base.rb, line 7
def initialize(config)
  @config = config
end

Public Instance Methods

get_environment(host) click to toggle source

@param [String] host hostname @return [String] environment name

# File lib/kondate/host_plugin/base.rb, line 13
def get_environment(host)
  ENV['ENVIRONMENT'] || 'development'
end
get_hosts(role) click to toggle source

@param [String] role role @return [Array] array of hosts

Available from kondate >= 0.3.0

# File lib/kondate/host_plugin/base.rb, line 27
def get_hosts(role)
  raise NotImplementedError
end
get_roles(host) click to toggle source

@param [String] host hostname @return [Array] array of roles

# File lib/kondate/host_plugin/base.rb, line 19
def get_roles(host)
  raise NotImplementedError
end