Sha256: 5a6b3c80b28bc590b2d76b994fb2e80c810e1cc7507ca22b92ce49d1fb038a99

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), '..', 'lib', 'soloist')

include Soloist::Util

log_level = ENV['LOG_LEVEL'] || "info"

soloistrc_contents, soloistrc_path = walk_up_and_find_file(with_or_without_dot("soloistrc"))
config_generator = Soloist::ChefConfigGenerator.new(YAML.load(soloistrc_contents), soloistrc_path)

soloistrc_contents, soloistrc_path = walk_up_and_find_file(with_or_without_dot("soloistrc_local"), :required => false)
config_generator.merge_config(YAML.load(soloistrc_contents), soloistrc_path) if soloistrc_contents

if ARGV.length >= 1
  requested_recipe = ARGV[0]
  raise "requested recipe '#{requested_recipe}' not in soloistrc or soloistrc_local" unless config_generator.recipes.include?(requested_recipe)
  config_generator.recipes = [requested_recipe]
end

solo_rb = fileify(config_generator.solo_rb)
metadata_json = fileify(config_generator.json_file)

command = "sudo bash -c '#{config_generator.preserved_environment_variables_string} chef-solo -j #{metadata_json.path} -c #{solo_rb.path} -l #{log_level}'"

puts "running chef: " + command
system(command) || exit(1)

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
soloist-0.9.5 bin/soloist
soloist-0.9.4 bin/soloist
soloist-0.9.3 bin/soloist
soloist-0.9.2 bin/soloist
soloist-0.9.1 bin/soloist
soloist-0.9.0 bin/soloist