Skip to content

[Feature]: Allow jinja expressions in filter values in inventory plugin #746

@brad2014

Description

@brad2014

Description

In a simple inventory.linode.yaml like the one below, the jinja2 lookup for api_token is properly expanded, but the lookup in the "tags" filter is not.

We ship this file for maintaining linode groups, and find it useful to set the group in the environment without having to include it explicitly in the inventory file.

New/Affected Components

plugins/inventory/instance.yaml

Example Ansible Config

plugin: linode.cloud.instance
api_token: "{{ lookup('env', 'LINODE_CLI_TOKEN') }}"
tags:
  - "{{ lookup('env', 'INVENTORY_GROUP') }}"
compose:
  ansible_host: ipv4[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementissues that request a enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions