Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory plugin collects instanceview but does not add to hostvars #1680

Open
pmcenery-bl opened this issue Aug 20, 2024 · 1 comment
Open
Labels
medium_priority Medium priority question Further information is requested work in In trying to solve, or in working with contributors

Comments

@pmcenery-bl
Copy link

SUMMARY

I would like to access the OS computer name which is available under instanceview. On inspecting the source code, it appears that it just never gets added to the hostvars. A simple edit here would make the instanceview available:

instanceview=self._instanceview

new_hostvars = dict(
network_interface=[],
mac_address=[],
network_interface_id=[],
security_group_id=[],
security_group=[],
public_ip_address=[],
public_ipv4_address=[],
public_dns_hostnames=[],
private_ipv4_addresses=[],
subnet=[],
id=self._vm_model['id'],
location=self._vm_model['location'],
name=self._vm_model['name'],
computer_name=self._vm_model['properties'].get('osProfile', {}).get('computerName'),
availability_zone=av_zone,
powerstate=self._powerstate,
provisioning_state=self._vm_model['properties']['provisioningState'].lower(),
tags=self._vm_model.get('tags', {}),
resource_type=self._vm_model.get('type', "unknown"),
vmid=self._vm_model['properties']['vmId'],
os_profile=dict(
system=system,
),

The information seems to be gathered but nothing is currently done with it. Is this intentional? If not, please can it be added?

@Fred-sun
Copy link
Collaborator

@pmcenery-bl Could you tell me more details? It will help to solve your problem. Thank you!

@Fred-sun Fred-sun added question Further information is requested medium_priority Medium priority work in In trying to solve, or in working with contributors labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority question Further information is requested work in In trying to solve, or in working with contributors
Projects
None yet
Development

No branches or pull requests

2 participants