Skip to content

Commit

Permalink
Added specs for --security-group-ids and also updated some specs to u…
Browse files Browse the repository at this point in the history
…se 'let' insted of instance variables
  • Loading branch information
Vasu1105 committed Aug 12, 2016
1 parent 31b1bcf commit c63f7a1
Show file tree
Hide file tree
Showing 2 changed files with 609 additions and 614 deletions.
6 changes: 2 additions & 4 deletions lib/chef/knife/ec2_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ class Ec2ServerCreate < Knife
:long => "--security-group-ids",
:description => "The security group ids for this server; required when using VPC. Mulitple values can be provide as -g sg-e985168d -g sg-e858768d",
:proc => Proc.new { |security_group_ids|
require 'pry'
binding.pry
if security_group_ids.split(',').size > 1
Chef::Log.error("[DEPRECATED] Comma separated values for --security-group-ids is deprecated. Provide --security-group-ids option multiple times if mulitple values has to be provided. for e.g. --security-group-ids sg-e985168d --security-group-ids sg-e7f06383 --security-group-ids sg-ec1b7e88 .")
exit 1
Expand Down Expand Up @@ -949,10 +947,10 @@ def eip_scope

def ssl_config_user_data
user_related_commands = ""
winrm_user = locate_config_value(:winrm_user).split("\\")
winrm_user = locate_config_value(:winrm_user).split("\\")
if (winrm_user[0] == ".") || (winrm_user[0] == "") ||(winrm_user.length == 1)
user_related_commands = <<-EOH
net user /add #{locate_config_value(:winrm_user).delete('.\\')} #{windows_password};
net user /add #{locate_config_value(:winrm_user).delete('.\\')} #{windows_password};
net localgroup Administrators /add #{locate_config_value(:winrm_user).delete('.\\')};
EOH
end
Expand Down
Loading

0 comments on commit c63f7a1

Please sign in to comment.