lib/ami_spec.rb in ami_spec-1.0.0 vs lib/ami_spec.rb in ami_spec-1.0.1

- old
+ new

@@ -102,11 +102,11 @@ type: :int, default: 30 opt :tags, "Additional tags to add to launched instances in the form of comma separated key=value pairs. i.e. Name=AmiSpec", type: :string, default: "" opt :debug, "Don't terminate instances on exit" opt :buildkite, "Output section separators for buildkite" opt :wait_for_rc, "Wait for oldschool SystemV scripts to run before conducting tests. Currently only supports Ubuntu with upstart" - opt :user_data_file, "File path for aws ec2 user data", type: :string + opt :user_data_file, "File path for aws ec2 user data", type: :string, default: nil opt :iam_instance_profile_arn, "IAM instance profile to use", type: :string end if options[:role] && options[:ami] options[:amis] = { options[:role] => options[:ami] } @@ -123,10 +123,10 @@ unless File.exist? options[:key_file] fail "Key file #{options[:key_file]} not found" end - unless options[:user_data_file] and File.exist? options[:user_data_file] + if options[:user_data_file] and !File.exist? options[:user_data_file] fail "User Data file #{options[:user_data_file]} not found" end options[:tags] = parse_tags(options[:tags])