Azure VM's behind Public LoadBalancer

21 views
Skip to first unread message

Michael Cruz

unread,
Jan 23, 2019, 4:11:53 PM1/23/19
to Ansible Project
Hello All,

I have Windows VM's in Azure behind a Public LoadBalancer  the VM's are set up to use a Network Security Group to keep traffic limited to our office. My inventory.yml is set up by name:port where the last digit is different

[LBName]
LBName.eastus.cloudapp.azure.com:xxxx
LBName.eastus.cloudapp.azure.com:xxxy
LBName.eastus.cloudapp.azure.com:xxxz

When I run a playbook I normally limit to the Group Name. I keep a separate group_vars yml for just the login information
The issue is that because the name is the same for all 3 only the first one ever gets reached for TASK [Gathering Facts]

These machines only have the public IP address which is the LB they have a Private IP which is not accessible at this time. This is why I am using the Public IP Address DNS Name.
Writing this out I could see a potential solution with creating a new network structure but that has a different issue for me. 
Any ideas?

Thank You!

MAc

Michael Cruz

unread,
Feb 8, 2019, 12:06:45 PM2/8/19
to Ansible Project
Turns out it was easier than I thought. 

[LB:children]
LB0
LB1

[LB0]
VMName00 ansible_host=LBName.eastus.cloudapp.azure.com ansible_port=xxxx
[LB1]
VMName01 ansible_host=LBName.eastus.cloudapp.azure.com ansible_port=xxxy

MAc
Reply all
Reply to author
Forward
0 new messages