Skip to content

Tweak wildcard variable handling #1241

@myllynen

Description

@myllynen

Currently wildcard vars are handled like

lookup('ansible.builtin.varnames', 'gateway_settings.*'))

which works but causes duplicated items e.g. with the following defined:

gateway_settings
gateway_settings_test

Tweaking the parameter to be

lookup('ansible.builtin.varnames', 'gateway_settings_.*'))

would solve this issue and allow both of the above work together or independently.

The only potential downside would be that variables like

gateway_settingstest

wouldn't be accepted anymore but that seem more like a good thing.

What do you think, would a PR for this be acceptable? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnewNew issue, this should be removed once reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions