# ansible to provision azure loadbalncer with private ip

**URL:** <https://forum.ansible.com/t/ansible-to-provision-azure-loadbalncer-with-private-ip/35040>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [April 23, 2021, 9:23am UTC](https://forum.ansible.com/t/ansible-to-provision-azure-loadbalncer-with-private-ip/35040 "2021-04-23T09:23:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rinshad\_rin](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Rinshad\_rin](https://forum.ansible.com/u/Rinshad_rin)\
**Post date:** [April 23, 2021, 9:23am UTC](https://forum.ansible.com/t/ansible-to-provision-azure-loadbalncer-with-private-ip/35040/1 "2021-04-23T09:23:32Z")

</div>

Hello,

I was trying to provision an Azure load-balancer with only a private IP address in an existing subnet. I could accomplish this with the below code.

- name: create load balancer azure\_rm\_loadbalancer: resource\_group: “{{resource\_group\_name}}” name: my\_new\_lb frontend\_ip\_configurations: - name: frontendipconf0 private\_ip\_address: private\_ip\_allocation\_method: dynamic subnet: /subscriptions/1234445sdffew11111111/resourceGroups/RG\_NAME/providers/Microsoft.Network/virtualNetworks/vnet-stage/subnets/default backend\_address\_pools: - name: backend\_pool1 probes: - name: prob0 port: 80 load\_balancing\_rules: - name: lbrbalancingrule0 frontend\_ip\_configuration: frontendipconf0 backend\_address\_pool: backend\_pool1 frontend\_port: 8000 backend\_port: 443 probe: prob0

But is there a way we can provision a loadbalancer without providing a complete subnet id in the task file?
