azure
azure copied to clipboard
Azure Resource Manager inventory plugin: Allow setting resources groups to include at runtime
SUMMARY
Allow setting resources groups to include at runtime via environment variable
ISSUE TYPE
- Feature Idea
COMPONENT NAME
Azure Resource Manager inventory plugin
ADDITIONAL INFORMATION
Currently, the Azure resource groups to include in the inventory needs to be provided as part of the provider's configuration file:
plugin: azure_rm
auth_source: cli
include_vm_resource_groups:
- my-rg1
- my-rg2
This is a quite strong limitation because it doesn't allow you to dynamically specify these groups at runtime. Also, the Python script provided for dynamic inventories in the previous Ansible versions did allow to set an environment variable to control this behaviour.
Sample usage:
ANSIBLE_AZURE_INCLUDE_VM_RESOURCE_GROUPS=my-rg1,my-rg2
ansible-playbook -i azure_rm.yml ...
@christophetd Thanks for you submit the issue. we will investigate those feature! Thank you very much!
Thanks, looking forward to it!
@Fred-sun any updates on this? I'm hitting the same issue of needing to specify the resource groups at runtime in pipelines. It doesn't appear that variables of any form are evaluated for include_vm_resource_groups
and I'm thinking I'm going to be forced into dynamically inserting into the inventory file.
@Liquidmantis Yes, if we want to include VMS under a certain resource group, it is necessary to enable dynamsterting into the inventory file. Thank you very much!
Thanks, looking forward to it!
@christophetd Yes, if you want to dynamically obtain VMS under a resource group, you need to obtain VMS from the Dynamic Inventory method. Thank you very much!
Is there any update on this? This would be tremendously helpful for deploying to multiple environments which we segregate by resource groups.
fixes by #975
@Fred-sun any update on your MR? Thanks for your work!
@HarishHary It has fixed by #975, and this PR is ready, It will be merged as soon as possible! Thank you very much!
Hello @Fred-sun, thanks for the fix again! Do you know when a new release is planned for the plugin? Still can't use it in production.
Hey! @HarishHary we are also waiting for this, our issue: Cannot pass variables into the dynamic inventory configuration.
@Fred-sun any plans for releasing?
@PiotrWachulec @HarishHary Recently we want to upgrade a package, they will be released together, the upgrade is under way, thank you!
Great, we are waiting! :)