Smart Variables match syntax

Hi,
when defining a smart variable with a match e.g. on the domain name, is it
only possible to use exact matches such as "domain = example.com", or is
there a way to search for substrings and so on, as in Foreman search
patterns using different operators and wildcards like "domain ~ .com",
"domain ~ *.edu"…?

I did some tests but only exact matches worked here… although I'm still
on 1.3 at the moment.

Thanks.
Marco

It's exact matches only, I think. We do know that needs to be extended

  • I think there's an issue open, but feel free to open one if not :slight_smile:

Greg

··· On 24 June 2014 12:46, wrote: > Hi, > when defining a smart variable with a match e.g. on the domain name, is it > only possible to use exact matches such as "domain = example.com", or is > there a way to search for substrings and so on, as in Foreman search > patterns using different operators and wildcards like "domain ~ .com", > "domain ~ *.edu"...? > > I did some tests but only exact matches worked here... although I'm still on > 1.3 at the moment.

Feature #3636: Regex support in matcher-values of smart variables and parameters - Foreman :slight_smile:

Though like a lot of things around smart variables, it might open up
questions about precedence. What happens if two matchers match?

··· On 24/06/14 18:16, Greg Sutcliffe wrote: > On 24 June 2014 12:46, wrote: >> Hi, >> when defining a smart variable with a match e.g. on the domain name, is it >> only possible to use exact matches such as "domain = example.com", or is >> there a way to search for substrings and so on, as in Foreman search >> patterns using different operators and wildcards like "domain ~ .com", >> "domain ~ *.edu"...? >> >> I did some tests but only exact matches worked here... although I'm still on >> 1.3 at the moment. > > It's exact matches only, I think. We do know that needs to be extended > - I think there's an issue open, but feel free to open one if not :)


Dominic Cleal
Red Hat Engineering