|
|
|
@ -64,6 +64,10 @@ EXAMPLES = '''
|
|
|
|
|
- name: Get facts for all load balancers
|
|
|
|
|
azure_rm_loadbalancer_facts:
|
|
|
|
|
|
|
|
|
|
- name: Get facts for all load balancers in a specific resource group
|
|
|
|
|
azure_rm_loadbalancer_facts:
|
|
|
|
|
resource_group: TestRG
|
|
|
|
|
|
|
|
|
|
- name: Get facts by tags
|
|
|
|
|
azure_rm_loadbalancer_facts:
|
|
|
|
|
tags:
|
|
|
|
@ -152,8 +156,14 @@ class AzureRMLoadBalancerFacts(AzureRMModuleBase):
|
|
|
|
|
|
|
|
|
|
self.log('List all load balancers')
|
|
|
|
|
|
|
|
|
|
if self.resource_group:
|
|
|
|
|
try:
|
|
|
|
|
response = self.network_client.load_balancers.list(self.resource_group)
|
|
|
|
|
except AzureHttpError as exc:
|
|
|
|
|
self.fail('Failed to list items in resource group {} - {}'.format(self.resource_group, str(exc)))
|
|
|
|
|
else:
|
|
|
|
|
try:
|
|
|
|
|
response = self.network_client.load_balancers.list()
|
|
|
|
|
response = self.network_client.load_balancers.list_all()
|
|
|
|
|
except AzureHttpError as exc:
|
|
|
|
|
self.fail('Failed to list all items - {}'.format(str(exc)))
|
|
|
|
|
|
|
|
|
|