Skip to content

Allow Jinja variables in dynamic inventory regions configuration #1450

Open
@keenan-v1

Description

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:

plugin: amazon.aws.aws_rds
statuses:
  - available
regions:
  - "{{ aws_region }}"

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    featureThis issue/PR relates to a feature requestneeds_verifiedSome one might want to take a look at this and reproduce it to confirm

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions