methods/ec_common.rb
# Check if AWS EC2 security group exists
Check if AWS EC2 security group exists
Check if AWS EC2 security group exists
def check_if_aws_security_group_exists(options)
  exists = false
  groups = get_aws_security_groups(options)
  groups.each do |group|
    group_name = group.group_name
    if options['group'].to_s.match(/^#{group_name}$/)
      exists = true
      return exists
    end
  end
  return exists
end
def check_if_aws_security_group_exists ( options ) exists = false groups = get_aws_security_groups ( options ) groups . each do | group | group_name = group . group_name if options [ 'group' ] . to_s . match ( / ^ #{ group_name } $ / ) exists = true return exists end end return exists end
Check if AWS EC2 security group exists
Check if AWS EC2 security group exists
options
<not_specific>