linode / linode/ansible_linode
[Feature]: Allow jinja expressions in filter values in inventory plugin
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 63
- Forks
- 38
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 7
Description
### 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
```yaml
plugin: linode.cloud.instance
api_token: "{{ lookup('env', 'LINODE_CLI_TOKEN') }}"
tags:
- "{{ lookup('env', 'INVENTORY_GROUP') }}"
compose:
ansible_host: ipv4[0]
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/inventory/instance.yaml and compare how the api_token lookup is expanded with how values in the tags filter are processed. Verify the example Ansible configuration, including the INVENTORY_GROUP lookup, and consider the work complete when Jinja expressions in filter values are expanded consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100