mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't commit private-ip changes from testing another bug...
This commit is contained in:
parent
78c85fbb31
commit
9e0fccd543
1 changed files with 3 additions and 8 deletions
|
@ -445,16 +445,14 @@ def create(vm_):
|
|||
swap_disk_id = create_swap_disk(vm_, node_id)['DiskID']
|
||||
|
||||
# Add private IP address if requested
|
||||
use_private_ip = get_private_ip(vm_)
|
||||
if use_private_ip:
|
||||
if get_private_ip(vm_):
|
||||
create_private_ip(vm_, node_id)
|
||||
|
||||
# Create a ConfigID using disk ids
|
||||
config_id = create_config(kwargs={'name': vm_['name'],
|
||||
'linode_id': node_id,
|
||||
'root_disk_id': root_disk_id,
|
||||
'swap_disk_id': swap_disk_id,
|
||||
'helper_network': True})['ConfigID']
|
||||
'swap_disk_id': swap_disk_id})['ConfigID']
|
||||
# Boot the Linode
|
||||
boot(kwargs={'linode_id': node_id,
|
||||
'config_id': config_id,
|
||||
|
@ -471,10 +469,7 @@ def create(vm_):
|
|||
data['private_ips'] = ips['private_ips']
|
||||
data['public_ips'] = ips['public_ips']
|
||||
|
||||
if use_private_ip:
|
||||
vm_['ssh_host'] = data['private_ips'][0]
|
||||
else:
|
||||
vm_['ssh_host'] = data['public_ips'][0]
|
||||
vm_['ssh_host'] = data['public_ips'][0]
|
||||
|
||||
# If a password wasn't supplied in the profile or provider config, set it now.
|
||||
vm_['password'] = get_password(vm_)
|
||||
|
|
Loading…
Add table
Reference in a new issue