Method: AmiSpec::ServerSpec#initialize
- Defined in:
- lib/ami_spec/server_spec.rb
#initialize(options) ⇒ ServerSpec
Returns a new instance of ServerSpec.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ami_spec/server_spec.rb', line 8 def initialize() instance = .fetch(:instance) public_ip = .fetch(:aws_public_ip) @debug = .fetch(:debug) @ip = public_ip ? instance.public_ip_address : instance.private_ip_address @role = instance..find{ |tag| tag.key == 'AmiSpec' }.value @spec = .fetch(:specs) @user = .fetch(:ssh_user) @key_file = .fetch(:key_file) @buildkite = .fetch(:buildkite) @user_data_file = .fetch(:user_data_file) @iam_instance_profile_arn = .fetch(:user_data_file) end |