mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
[ecs_service] fix assign_public_ip network configuration to module parameter rather than fixed string (#41689)
Fix parameter name Use suboptions document suboptions Add a test to assert assign_public_ip is configurable
This commit is contained in:
parent
37293dec3d
commit
1268ce4d4f
5 changed files with 38 additions and 16 deletions
|
@ -58,9 +58,9 @@
|
|||
network_configuration:
|
||||
subnets:
|
||||
- subnet-abcd1234
|
||||
groups:
|
||||
security_groups:
|
||||
- sg-abcd1234
|
||||
assign_public_ip: true
|
||||
assign_public_ip: ENABLED
|
||||
state: present
|
||||
<<: *aws_connection_info
|
||||
register: ecs_service_creation_vpc
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
network_configuration:
|
||||
subnets:
|
||||
- subnet-abcd1234
|
||||
groups:
|
||||
security_groups:
|
||||
- sg-abcd1234
|
||||
state: present
|
||||
<<: *aws_connection_info
|
||||
|
@ -90,7 +90,7 @@
|
|||
network_configuration:
|
||||
subnets:
|
||||
- subnet-abcd1234
|
||||
groups:
|
||||
security_groups:
|
||||
- sg-abcd1234
|
||||
launch_type: FARGATE
|
||||
state: present
|
||||
|
@ -132,7 +132,7 @@
|
|||
network_configuration:
|
||||
subnets:
|
||||
- subnet-abcd1234
|
||||
groups:
|
||||
security_groups:
|
||||
- sg-abcd1234
|
||||
<<: *aws_connection_info
|
||||
register: ecs_task_creation_vpc
|
||||
|
|
|
@ -629,9 +629,15 @@
|
|||
subnets: "{{ setup_subnet.results | json_query('[].subnet.id') }}"
|
||||
security_groups:
|
||||
- '{{ setup_sg.group_id }}'
|
||||
assign_public_ip: ENABLED
|
||||
<<: *aws_connection_info
|
||||
register: ecs_fargate_service_network_with_awsvpc
|
||||
|
||||
- name: assert that public IP assignment is enabled
|
||||
assert:
|
||||
that:
|
||||
- 'ecs_fargate_service_network_with_awsvpc.service.networkConfiguration.awsvpcConfiguration.assignPublicIp == "ENABLED"'
|
||||
|
||||
# ============================================================
|
||||
# End tests for Fargate
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ ansible-playbook -i ../../inventory -e @../../integration_config.yml -e @../../c
|
|||
# Run full test suite
|
||||
virtualenv --system-site-packages --python "${PYTHON}" "${MYTMPDIR}/botocore-recent"
|
||||
source "${MYTMPDIR}/botocore-recent/bin/activate"
|
||||
$PYTHON -m pip install 'botocore>=1.8.0' boto3
|
||||
$PYTHON -m pip install 'botocore>=1.8.4' boto3
|
||||
ansible-playbook -i ../../inventory -e @../../integration_config.yml -e @../../cloud-config-aws.yml -v playbooks/full_test.yml "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue