# Apply weight to the elb\_application\_lb

**URL:** <https://forum.ansible.com/t/apply-weight-to-the-elb-application-lb/36192>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [January 12, 2022, 11:47am UTC](https://forum.ansible.com/t/apply-weight-to-the-elb-application-lb/36192 "2022-01-12T11:47:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anita](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@Anita](https://forum.ansible.com/u/Anita)\
**Post date:** [January 12, 2022, 11:47am UTC](https://forum.ansible.com/t/apply-weight-to-the-elb-application-lb/36192/1 "2022-01-12T11:47:58Z")

</div>

Hello,

In terraform you can attach a weight to the default\_action under listeners to forward a percentage of traffic to another target group [https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb\_listener](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener).

Is the available in ansible.  
[https://docs.ansible.com/ansible/latest/collections/community/aws/elb\_application\_lb\_module.html](https://docs.ansible.com/ansible/latest/collections/community/aws/elb_application_lb_module.html)

I can see under listeners we have TargetGroupArn and Type but no weight like it is available in terraform. Can anyone suggest a way to get around this?

Thanks

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 12, 2022, 7:03pm UTC](https://forum.ansible.com/t/apply-weight-to-the-elb-application-lb/36192/2 "2022-01-12T19:03:42Z")

</div>

It might just work if you define it in the structure that you supply
