lib/testlab/provisioners/omnitruck.rb in testlab-0.4.0 vs lib/testlab/provisioners/omnitruck.rb in testlab-0.4.1

- old
+ new

@@ -38,11 +38,12 @@ :chef_webui => (chef_pre_11? ? '/etc/chef/webui.pem' : '/etc/chef-server/chef-webui.pem'), :chef_admin => (chef_pre_11? ? '/etc/chef/admin.pem' : '/etc/chef-server/admin.pem'), :default_password => "p@ssw01d", :user => ENV['USER'], :hostname_short => container.id, - :hostname_full => container.fqdn + :hostname_full => container.fqdn, + :omnibus_version => omnibus_version }).merge!(@config) container.bootstrap(ZTK::Template.render(omnibus_template, config)) end # OmniTruck Provisioner Container Teardown @@ -58,11 +59,12 @@ private def build_chef_solo_10_attributes(container) { - "chef-server" => { + "chef_server" => { + "url" => "https://#{container.fqdn}", "webui_enabled" => true }, "run_list" => %w(recipe[chef-server::rubygems-install] recipe[chef-server::apache-proxy]) } end @@ -104,9 +106,17 @@ def chef_pre_11? if (@config[:version].to_s.downcase != "latest") && (@config[:version].to_f < 11.0) true else false + end + end + + def omnibus_version + if (@config[:version].to_f == 0.1) + "10.12.0" + else + @config[:version] end end end