* fix azure_rm.py not showing nic info for vmss (#53496)
* fix vmss nic
* resolve comments
(cherry picked from commit 710b05fae7
)
* add changelog
This commit is contained in:
parent
3c4affeafc
commit
e31620e9db
2 changed files with 9 additions and 7 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- azure_rm inventory plugin - fix no nic type in vmss nic. (https://github.com/ansible/ansible/pull/53496)
|
|
@ -567,7 +567,6 @@ class AzureHost(object):
|
|||
for s in vm_instanceview_model.get('statuses', []) if self._powerstate_regex.match(s.get('code', ''))), 'unknown')
|
||||
|
||||
def _on_nic_response(self, nic_model, is_primary=False):
|
||||
if nic_model.get('type') == 'Microsoft.Network/networkInterfaces':
|
||||
nic = AzureNic(nic_model=nic_model, inventory_client=self._inventory_client, is_primary=is_primary)
|
||||
self.nics.append(nic)
|
||||
|
||||
|
@ -580,6 +579,7 @@ class AzureNic(object):
|
|||
|
||||
self.public_ips = {}
|
||||
|
||||
if nic_model.get('properties', {}).get('ipConfigurations'):
|
||||
for ipc in nic_model['properties']['ipConfigurations']:
|
||||
pip = ipc['properties'].get('publicIPAddress')
|
||||
if pip:
|
||||
|
|
Loading…
Reference in a new issue