Skip to content

Commit

Permalink
update subnet value when creating load balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo committed Dec 20, 2023
1 parent 0b40c4e commit eb7c6f3
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions roles/deploy_flask_app/tasks/setup_infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,24 @@
deploy_flask_app_workers_instances: "{{ deploy_flask_app_vms.instances }}"
deploy_flask_app_workers_join: "{{ deploy_flask_app_instances_list | join(',') }}"

# - name: Create load balancer
# amazon.aws.elb_classic_lb:
# state: present
# name: "{{ deploy_flask_app__resource_prefix }}-lb"
# listeners:
# - load_balancer_port: "{{ deploy_flask_app_listening_port }}"
# instance_port: 5000
# protocol: HTTP
# instance_protocol: HTTP
# instance_ids: "{{ deploy_flask_app_vms.instances | map(attribute='instance_id') | list }}"
# security_group_ids:
# - "{{ deploy_flask_app__group_id }}"
# subnets:
# - "{{ deploy_flask_app__group_id }}"
# scheme: internet-facing
# wait: true
# wait_timeout: 360
# retries: 5
# delay: 10
# until: deploy_flask_app_lb_result is successful
# register: deploy_flask_app_lb_result
- name: Create load balancer
amazon.aws.elb_classic_lb:
state: present
name: "{{ deploy_flask_app__resource_prefix }}-lb"
listeners:
- load_balancer_port: "{{ deploy_flask_app_listening_port }}"
instance_port: 5000
protocol: HTTP
instance_protocol: HTTP
instance_ids: "{{ deploy_flask_app_vms.instances | map(attribute='instance_id') | list }}"
security_group_ids:
- "{{ deploy_flask_app__group_id }}"
subnets:
- "{{ deploy_flask_app__public_subnet_id }}"
scheme: internet-facing
wait: true
wait_timeout: 360
retries: 5
delay: 10
until: deploy_flask_app_lb_result is successful
register: deploy_flask_app_lb_result

0 comments on commit eb7c6f3

Please sign in to comment.