-
Notifications
You must be signed in to change notification settings - Fork 342
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
Allow Jinja variables in dynamic inventory regions configuration #1450
Comments
Files identified in the description:
If these files are inaccurate, please update the |
I'm having a similar problem with a different field ( @s-hertel I don't understand why some fields are templated and some aren't. I'm trying to spot the difference in the code. amazon.aws/plugins/plugin_utils/inventory.py Lines 31 to 37 in f399fb7
and used here? amazon.aws/plugins/plugin_utils/inventory.py Lines 49 to 58 in f399fb7
|
Any updates? I too would like to use templates with |
@keenan-v1 Hello. By #1980, the region and regions parameters are support template. It will be included in a future release.
---
plugin: aws_ec2
regions:
- "{{ lookup('env', 'AWS_REGION') }}"
hostnames:
- tag:Name
However, --extra-vars is still not supported. |
Summary
I am trying to make an inventory configuration using the aws_ec2 and aws_rds plugins. Using best practices with IaC, I pass my region in as a variable. I discovered that the following does not currently work:
The error is that
{{ aws_region }}
is not a valid region, which is correct. I expected it to replace the value with the desired region.Issue Type
Feature Idea
Component Name
aws_rds, aws_ec2 inventory plugins
Additional Information
I would like this to work:
Code of Conduct
The text was updated successfully, but these errors were encountered: