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

Azure Resource Manager inventory plugin: Allow setting resources groups to include at runtime #152

Closed
christophetd opened this issue Jun 8, 2020 · 13 comments
Labels
has_pr PR fixes have been made inventory plugin/Inventory/azure_rm.py related issues medium_priority Medium priority

Comments

@christophetd
Copy link

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 ...
@Fred-sun
Copy link
Collaborator

@christophetd Thanks for you submit the issue. we will investigate those feature! Thank you very much!

@christophetd
Copy link
Author

Thanks, looking forward to it!

@Fred-sun Fred-sun added the inventory plugin/Inventory/azure_rm.py related issues label Aug 5, 2020
@Liquidmantis
Copy link

@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.

@Fred-sun
Copy link
Collaborator

@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!

@Fred-sun
Copy link
Collaborator

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!

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Aug 18, 2021
@joshlrogers
Copy link

Is there any update on this? This would be tremendously helpful for deploying to multiple environments which we segregate by resource groups.

@Fred-sun Fred-sun added has_pr PR fixes have been made and removed work in In trying to solve, or in working with contributors labels Sep 20, 2022
@Fred-sun
Copy link
Collaborator

fixes by #975

@HarishHary
Copy link

@Fred-sun any update on your MR? Thanks for your work!

@Fred-sun
Copy link
Collaborator

@HarishHary It has fixed by #975, and this PR is ready, It will be merged as soon as possible! Thank you very much!

@HarishHary
Copy link

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.

@PiotrWachulec
Copy link

Hey! @HarishHary we are also waiting for this, our issue: Cannot pass variables into the dynamic inventory configuration.

@Fred-sun any plans for releasing?

@Fred-sun
Copy link
Collaborator

@PiotrWachulec @HarishHary Recently we want to upgrade a package, they will be released together, the upgrade is under way, thank you!

@PiotrWachulec
Copy link

Great, we are waiting! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr PR fixes have been made inventory plugin/Inventory/azure_rm.py related issues medium_priority Medium priority
Projects
None yet
Development

No branches or pull requests

6 participants