-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add support to Azure StackHCI vms in the inventory plugin #1620
Conversation
Prevents impacting existing inventories, even if AzureStackHCI + Ansible is somewhat new & niche
@TiTi Please fix the following sanity error! Thank you very much!
|
ansible-test sanity plugins/inventory/azure_rm.py --color --junit -v
Ok fixed, sorry about that. |
ping @Fred-sun |
This would be really useful for us. @Fred-sun , can this be looked at please? |
@TiTi Okay, I'll complete the review and move forward with the merger as soon as possible. Thank you! |
@Fred-sun , Appreciate it. Looking forward to getting HCI tied into our ansible system |
@xuzhang3 , this is a fairly large blocker for a project. Can I help in getting this reviewed in any way? thanks |
plugins/inventory/azure_rm.py
Outdated
next_link = response.get('nextLink') | ||
|
||
if next_link: | ||
self._enqueue_get(url=next_link, api_version=self._compute_api_version, handler=self._on_arcvm_page_response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be:
self._enqueue_get(url=next_link, api_version=self._hybridcompute_api_version, handler=self._on_arcvm_page_response)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, will fix that
This is great work. I have a couple questions though. 1 - We have a request to add ARC support to ansible, as you know the AzureStackHCI hosts are themselves ARC machines. So I've updated your PR to include those in the inventory. #1735 I haven't done this yet, but plan to add support to the above PR to setup the ssh config which you would get when running the following azure cli command:
Thanks, |
Seen by p3ck in code review
Ok thx for catching invalid api_version on next link, fixed. 1 - Arc object are different and have less properties overall so yeah it makes sens to create a dedicated ---
plugin: azure.azcollection.azure_rm
#...
hostvar_expressions:
# kerberos needs FQDN ; zscaler (remote) needs dns
ansible_host: (private_ipv4_addresses | first) if os_profile.system == 'linux' else computer_name | default(name, true)
#... By defining |
…llections#1620) * Add support to Azure StackHCI vms in the inventory plugin * Change default behavior to no HCI vm fetch Prevents impacting existing inventories, even if AzureStackHCI + Ansible is somewhat new & niche * Fix sanity errors ansible-test sanity plugins/inventory/azure_rm.py --color --junit -v * Improve comments * Handle when a guest agent is disabled (it brokes the inventory plugin otherwise) * Fix api_version on next page Seen by p3ck in code review
SUMMARY
Add ability to list Azure Stack HCI vms
ISSUE TYPE
COMPONENT NAME
azure_rm inventory plugin
ADDITIONAL INFORMATION
This is done to prevent impact on existing inventories, even if AzureStackHCI + Ansible is somewhat new & niche