Pārlūkot izejas kodu

Merge pull request #60 from kwoodson/host_type_fix

Fixed issue where --name was insufficient to apply config.
Kenny Woodson 10 gadi atpakaļ
vecāks
revīzija
9fed362101
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      lib/aws_command.rb

+ 3 - 3
lib/aws_command.rb

@@ -76,9 +76,9 @@ module OpenShift
         host_type = nil
         host_type = nil
         if options[:name]
         if options[:name]
           details = AwsHelper.get_host_details(options[:name])
           details = AwsHelper.get_host_details(options[:name])
-          ah.extra_vars['oo_host_group_exp'] = options[:name]
-          ah.extra_vars['oo_env'] = details['env']
-          host_type = details['host-type']
+          ah.extra_vars['oo_host_group_exp'] = details['ec2_public_dns_name']
+          ah.extra_vars['oo_env'] = details['ec2_tag_environment']
+          host_type = details['ec2_tag_host-type']
         elsif options[:type] && options[:env]
         elsif options[:type] && options[:env]
           oo_env_host_type_tag = AwsHelper.generate_env_host_type_tag_name(options[:env], options[:type])
           oo_env_host_type_tag = AwsHelper.generate_env_host_type_tag_name(options[:env], options[:type])
           ah.extra_vars['oo_host_group_exp'] = "groups['#{oo_env_host_type_tag}']"
           ah.extra_vars['oo_host_group_exp'] = "groups['#{oo_env_host_type_tag}']"