Smart Variables with AND/OR logic - is it possible?

Hi

Im doing a puppet module that will automatically assign a repository based
on hw vendor.

I'm using a Smart Variable to set the repository name.
Right now i have some Matchers, created on on architecture= , e.g
architecture=x86_64

I Have also done Matcher on operatingsystemmajrelease, e.g = 7 .

But, i Would like to do something with some 'AND' statement so that i can
do: e.g "architecture = x86_64 and operatingsystemmajrelease=6"

I have tried Matcher on: architecture = x86_64, operatingsystemmajrelease=6
. and alot of different types of separators but none worked so far.

Any suggestions, or is this even possible?

Have you tried just using the word 'and' ?

Here's an example

··· On Thu, May 26, 2016 at 8:20 AM, Hampus Lundqvist < hampus.lundqvist@gmail.com> wrote:

Hi

Im doing a puppet module that will automatically assign a repository based
on hw vendor.

I’m using a Smart Variable to set the repository name.
Right now i have some Matchers, created on on architecture= , e.g
architecture=x86_64

I Have also done Matcher on operatingsystemmajrelease, e.g = 7 .

But, i Would like to do something with some ‘AND’ statement so that i can
do: e.g “architecture = x86_64 and operatingsystemmajrelease=6”

I have tried Matcher on: architecture = x86_64,
operatingsystemmajrelease=6 . and alot of different types of separators
but none worked so far.

Any suggestions, or is this even possible?


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

> Hi
>
> Im doing a puppet module that will automatically assign a repository based
> on hw vendor.
>
> I'm using a Smart Variable to set the repository name.
> Right now i have some Matchers, created on on architecture= , e.g
> architecture=x86_64
>
> I Have also done Matcher on operatingsystemmajrelease, e.g = 7 .
>

You can use that kind of query (e.g. AND) assuming you have those in the
order list.
for example.

in your order you should have:

architecture,operatingsystemmajrelease

and in your matcher you should have:

architecture=i386, operatingsystemmajrelease=7

Ohad

··· On Thu, May 26, 2016 at 10:20 AM, Hampus Lundqvist < hampus.lundqvist@gmail.com> wrote:

But, i Would like to do something with some ‘AND’ statement so that i can
do: e.g “architecture = x86_64 and operatingsystemmajrelease=6”

I have tried Matcher on: architecture = x86_64,
operatingsystemmajrelease=6 . and alot of different types of separators
but none worked so far.

Any suggestions, or is this even possible?


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks!
Just figured that out too… i forgot to add it in the 'order', doh!

··· On Thursday, May 26, 2016 at 10:22:26 AM UTC+2, ohad wrote: > > > > On Thu, May 26, 2016 at 10:20 AM, Hampus Lundqvist > wrote: > >> Hi >> >> Im doing a puppet module that will automatically assign a repository >> based on hw vendor. >> >> I'm using a Smart Variable to set the repository name. >> Right now i have some Matchers, created on on architecture= , e.g >> architecture=x86_64 >> >> I Have also done Matcher on operatingsystemmajrelease, e.g = 7 . >> > > You can use that kind of query (e.g. AND) assuming you have those in the > order list. > for example. > > in your order you should have: > > architecture,operatingsystemmajrelease > > and in your matcher you should have: > > architecture=i386, operatingsystemmajrelease=7 > > Ohad > >> >> But, i Would like to do something with some 'AND' statement so that i >> can do: e.g "architecture = x86_64 and operatingsystemmajrelease=6" >> >> I have tried Matcher on: architecture = x86_64, >> operatingsystemmajrelease=6 . and alot of different types of separators >> but none worked so far. >> >> Any suggestions, or is this even possible? >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >