Skip to content

Commit

Permalink
code modification
Browse files Browse the repository at this point in the history
  • Loading branch information
sakar97 committed Mar 20, 2021
1 parent 1b41f48 commit c4ca1bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/ecs_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ def main():

service_mgr = EcsExecManager(module)

if module.params['network_configuration'] and not service_mgr.ecs_api_handles_network_configuration():
if module.params['network_configuration']:
if module.params['network_configuration']['assignPublicIp'] and not service_mgr.ecs_api_handles_network_configuration_assignIp():
module.fail_json(msg='botocore needs to be version 1.8.4 or higher to use assign_public_ip in network_configuration')
else:
elif not service_mgr.ecs_api_handles_network_configuration():
module.fail_json(msg='botocore needs to be version 1.7.44 or higher to use network configuration')

if module.params['launch_type'] and not service_mgr.ecs_api_handles_launch_type():
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/ecs_cluster/tasks/full_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@
<<: *aws_connection_info
register: fargate_run_task_output_with_tags

- name: create fargate ECS task with run task and assign public ip disable
- name: create fargate ECS task with run task and assign public ip disable
ecs_task:
operation: run
cluster: "{{ ecs_cluster_name }}"
Expand Down

0 comments on commit c4ca1bc

Please sign in to comment.