add possibility to manually set private ip to created instances
This commit is contained in:
parent
3e9c24bbf2
commit
8b0b1f9e11
@ -71,7 +71,7 @@ class Server < Handler
|
||||
:deploy_env => @args[3]
|
||||
}
|
||||
|
||||
[:key, :without_bootstrap, :name, :groups, :force].each do |k|
|
||||
[:key, :without_bootstrap, :name, :groups, :force, :private_ip].each do |k|
|
||||
q[k] = self.options[k] unless self.options[k].nil?
|
||||
end
|
||||
|
||||
|
||||
@ -122,6 +122,8 @@ class ServerOptions < CommonOptions
|
||||
options[:groups] = groups.split(",")
|
||||
end
|
||||
|
||||
parser.recognize_option_value(:private_ip, 'server', short: '-N', i18n_scope: 'create')
|
||||
|
||||
# it was disabled somewhy
|
||||
# parser.on('--public-ip', "Associate public IP with server") do
|
||||
# options[:public_ip] = true
|
||||
|
||||
@ -360,11 +360,12 @@ en:
|
||||
unreserve:
|
||||
instance: Unreserve server by instance id
|
||||
create:
|
||||
without-bootstrap: 'Run server without bootsraping phase'
|
||||
without_bootstrap: 'Run server without bootsraping phase'
|
||||
name: Set node name
|
||||
groups: The security groups for this server
|
||||
force: Cancel rollback operation on error
|
||||
key: User another key for server
|
||||
private_ip: Private ip for this server
|
||||
bootstrap:
|
||||
name: Set chef name
|
||||
bootstrap_template: Bootstrap template
|
||||
|
||||
@ -82,7 +82,8 @@ module Devops
|
||||
"deploy_env" => @deploy_env.identifier,
|
||||
"created_by" => options["created_by"],
|
||||
"provider" => @deploy_env.provider,
|
||||
"provider_account" => @deploy_env.provider_account
|
||||
"provider_account" => @deploy_env.provider_account,
|
||||
"private_ip" => options["private_ip"]
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
@ -99,7 +99,8 @@ module Provider
|
||||
options = {
|
||||
"InstanceType" => flavor,
|
||||
# "Placement.AvailabilityZone" => s.options[:availability_zone],
|
||||
"KeyName" => self.ssh_key
|
||||
"KeyName" => self.ssh_key,
|
||||
"PrivateIpAddress" => s.private_ip
|
||||
}
|
||||
vpcId = nil
|
||||
unless subnets.empty?
|
||||
|
||||
Loading…
Reference in New Issue
Block a user