Skip to content

Commit

Permalink
ec2_instance: fix launch_template condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Akasurde committed Jun 19, 2020
1 parent 02ad856 commit 2c58870
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ def build_top_level_options(params):

if params.get('launch_template') is not None:
spec['LaunchTemplate'] = {}
if not params.get('launch_template').get('id') or params.get('launch_template').get('name'):
if not params.get('launch_template').get('id') and not params.get('launch_template').get('name'):
module.fail_json(msg="Could not create instance with launch template. Either launch_template.name or launch_template.id parameters are required")

if params.get('launch_template').get('id') is not None:
Expand Down

0 comments on commit 2c58870

Please sign in to comment.