If the private_ip has been provided for the new network interface it shouldn't also be added to top level parameters for run_instances (#52579)

changelog
This commit is contained in:
Sloane Hertel 2019-03-04 12:55:37 -06:00 committed by GitHub
parent 239fb1f68d
commit 4cf7854ca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
bugfixes:
- ec2 - if the private_ip has been provided for the new network interface it shouldn't also be added to top level
parameters for run_instances()

View file

@ -1112,7 +1112,7 @@ def create_instances(module, ec2, vpc, override_count=None):
# check to see if we're using spot pricing first before starting instances
if not spot_price:
if assign_public_ip and private_ip:
if assign_public_ip is not None and private_ip:
params.update(
dict(
min_count=count_remaining,