Skip to content

Conversation

@Skitionek
Copy link
Contributor

SUMMARY

There can be nic without vmss which would error the code.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure_rm

ADDITIONAL INFORMATION
new_hostvars = dict(
            # (...)
            vmss=dict(
                id=self._vmss['id'],
                name=self._vmss['name'],
            ) if self._vmss else {},
            # (...)
        )
        # (...)

        if len(self.nics) == 0:
            # Set the attribute information related to the Uniform VMSS instance
            # Set os compute name, os name, os version and hyper V generation
            resource_group = new_hostvars['resource_group']
            vmss_name = new_hostvars['vmss']['name']

Is failing if len(self.nics) == 0 and self._vmss is None

There can be nic without vmss which would error the code.
@zunyangc
Copy link
Collaborator

Hi @magodo, all test passed, please proceed to merge. Pipeline test

@magodo magodo merged commit 7c85083 into ansible-collections:dev Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants