Skip to content

Conversation

Alex-Welsh
Copy link
Member

Adding a custom ansible filter.

This is mainly to serve as an example that we can extend in the future with more custom filters so we can avoid some of the hairy jinja templating we've needed in the past. (See etc/kayobe/inventory/group_vars/all/firewall for example)

@Alex-Welsh Alex-Welsh requested a review from a team as a code owner July 28, 2025 15:12
@product-auto-label product-auto-label bot added size: s ansible Ansible playbooks monitoring All things related to observability & telemetry labels Jul 28, 2025
@Alex-Welsh
Copy link
Member Author

This is directly compatible with #1744

@Alex-Welsh Alex-Welsh requested a review from jovial August 15, 2025 09:25
Copy link
Member

@dougszumski dougszumski left a comment

Choose a reason for hiding this comment

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

Maybe I've missed something, but shouldn't the filter live in kayobe? There is already a test framework there too.

Copy link
Member

@dougszumski dougszumski left a comment

Choose a reason for hiding this comment

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

Any filters designed for Kayobe config would best live in Kayobe, so they can be used there, and in OpenStack Kayobe config etc.

@Alex-Welsh
Copy link
Member Author

Any filters designed for Kayobe config would best live in Kayobe, so they can be used there, and in OpenStack Kayobe config etc.

I agree that this filter might also be useful in Kayobe upstream, though I don't think that would apply to all custom filters. The idea that started this in the first place was that @GavinHeff is writing a custom fact-gathering playbook and there's some very specific templating. A custom filter would be very useful for formating that data, but would be pretty useless upstream.

The main reason I'm adding this is just so that we have a precedent for future filters that we would only care about downstream. The actual content of the filter isn't really the point of the change. Personally, I'd like to keep this downstream for now, and move it upstream if we have a need for it in the future.

@Alex-Welsh Alex-Welsh closed this Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ansible Ansible playbooks monitoring All things related to observability & telemetry size: m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants