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

support for environment variable ANSIBLE_AZURE_VM_RESOURCE_GROUPS #975

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

Zun1k
Copy link
Contributor

@Zun1k Zun1k commented Sep 15, 2022

SUMMARY

Hi I have a fix for: #152

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure inventory

ADDITIONAL INFORMATION

Environment variable ANSIBLE_AZURE_VM_RESOURCE_GROUPS is used if exists. If not self option 'include_vm_resource_groups' is in use

ANSIBLE_AZURE_VM_RESOURCE_GROUPS=my-first-rg,my-sec-rg ansible-inventory -i azure_rm.yaml --graph

Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small change request!

for vm_rg in self.get_option('include_vm_resource_groups'):
self._enqueue_vm_list(vm_rg)
if os.environ.get('ANSIBLE_AZURE_VM_RESOURCE_GROUPS'):
for vm_rg in os.environ['ANSIBLE_AZURE_VM_RESOURCE_GROUPS'].split(","):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove one whitespace!

Suggested change
for vm_rg in os.environ['ANSIBLE_AZURE_VM_RESOURCE_GROUPS'].split(","):
for vm_rg in os.environ['ANSIBLE_AZURE_VM_RESOURCE_GROUPS'].split(","):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@Fred-sun Fred-sun added inventory plugin/Inventory/azure_rm.py related issues medium_priority Medium priority work in In trying to solve, or in working with contributors labels Sep 20, 2022
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inventory plugin/Inventory/azure_rm.py related issues medium_priority Medium priority ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants