Module: ElasticInfra::DirectorBootstrapBase

Included in:
DirectorBootstrapLinux, DirectorBootstrapWindows
Defined in:
lib/chef/knife/director_bootstrap_base.rb

Overview

Common DirectorBootstrap module

Instance Method Summary collapse

Instance Method Details

#bootstrap_templateObject



6
7
8
9
# File 'lib/chef/knife/director_bootstrap_base.rb', line 6

def bootstrap_template
  return nil if config[:bootstrap_template] == '__no_template__'
  config[:bootstrap_template] || @default_template
end

#runObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/chef/knife/director_bootstrap_base.rb', line 11

def run
  unless config[:environment]
    puts 'You must specify environment other than _default'
    show_usage
    exit 1
  end
  target_hostname = name_args[0].gsub(/.*@/, '')
  config[:chef_node_name] ||= target_hostname
  config[:bootstrap_template] = bootstrap_template
  super
end