Hi group,
I have found a problem trying to match the OS in the filters, ive tried
many things and i dont know what its happening, those are my examples:
os=CentOS
os="CentOS 6.7"
os="CentOS6.7"
Where is foreman getting this param from?¿ i thought it is from os facter
but it isnt:
[root@centos-test ~]# facter | grep CentOS
lsbdistdescription => CentOS release 6.7 (Final)
lsbdistid => CentOS
operatingsystem => CentOS
os => {"name"=>"CentOS", "lsb"=>{"distid"=>"CentOS",
"minordistrelease"=>"7", "distcodename"=>"Final", "majdistrelease"=>"6",
"distrelease"=>"6.7",
"release"=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
"distdescription"=>"CentOS release 6.7 (Final)"},
"release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"}, "family"=>"RedHat"}
Any suggestions?¿
Thanks
Hello,
in which filters do you try to match it? There should be auto-completion that
usually helps, e.g. for filter on Host resource "os = CentOS" should work. The
name of OS is usually updated by the value from facter but there's a custom
logic in Foreman which combines multiple values from facter and does some
conversions.
Hope this helps
···
--
Marek
On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
Hi group,
I have found a problem trying to match the OS in the filters, ive tried
many things and i dont know what its happening, those are my examples:
os=CentOS
os="CentOS 6.7"
os=“CentOS6.7”
Where is foreman getting this param from?¿ i thought it is from os facter
but it isnt:
[root@centos-test ~]# facter | grep CentOS
lsbdistdescription => CentOS release 6.7 (Final)
lsbdistid => CentOS
operatingsystem => CentOS
os => {“name”=>“CentOS”, “lsb”=>{“distid”=>“CentOS”,
“minordistrelease”=>“7”, “distcodename”=>“Final”, “majdistrelease”=>“6”,
“distrelease”=>“6.7”,
“release”=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
“distdescription”=>“CentOS release 6.7 (Final)”},
“release”=>{“full”=>“6.7”, “major”=>“6”, “minor”=>“7”}, “family”=>“RedHat”}
Any suggestions?¿
Thanks
Hi Marek,
Thanks for the answer, im trying to use it here, in the smart class
parameter(see attachment). It seems that the os facter doesnt come from
foreman yaml.
Cheers
···
On Thursday, 17 March 2016 11:17:18 UTC+1, Marek Hulán wrote:
>
> Hello,
>
> in which filters do you try to match it? There should be auto-completion
> that
> usually helps, e.g. for filter on Host resource "os = CentOS" should
> work. The
> name of OS is usually updated by the value from facter but there's a
> custom
> logic in Foreman which combines multiple values from facter and does some
> conversions.
>
> Hope this helps
>
> --
> Marek
>
> On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
> > Hi group,
> >
> > I have found a problem trying to match the OS in the filters, ive tried
> > many things and i dont know what its happening, those are my examples:
> >
> > os=CentOS
> > os="CentOS 6.7"
> > os="CentOS6.7"
> >
> > Where is foreman getting this param from?¿ i thought it is from os
> facter
> > but it isnt:
> > [root@centos-test ~]# facter | grep CentOS
> > lsbdistdescription => CentOS release 6.7 (Final)
> > lsbdistid => CentOS
> > operatingsystem => CentOS
> > os => {"name"=>"CentOS", "lsb"=>{"distid"=>"CentOS",
> > "minordistrelease"=>"7", "distcodename"=>"Final", "majdistrelease"=>"6",
> > "distrelease"=>"6.7",
> >
> "release"=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
>
> > "distdescription"=>"CentOS release 6.7 (Final)"},
> > "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"},
> "family"=>"RedHat"}
> >
> > Any suggestions?¿
> > Thanks
>
>
Hi,
The matcher uses the os's full name which in your case looks like "CentOS
6.7".
In the screenshot you used: "os=CentOS".
Can you try: os="CentOS 6.7" (put the double quotes after the os=) ?
Thanks,
Ori
···
On Thu, Mar 17, 2016 at 1:43 PM, Fran Rodríguez wrote:
Hi Marek,
Thanks for the answer, im trying to use it here, in the smart class
parameter(see attachment). It seems that the os facter doesnt come from
foreman yaml.
Cheers
On Thursday, 17 March 2016 11:17:18 UTC+1, Marek Hulán wrote:
Hello,
in which filters do you try to match it? There should be auto-completion
that
usually helps, e.g. for filter on Host resource “os = CentOS” should
work. The
name of OS is usually updated by the value from facter but there’s a
custom
logic in Foreman which combines multiple values from facter and does some
conversions.
Hope this helps
–
Marek
On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
Hi group,
I have found a problem trying to match the OS in the filters, ive tried
many things and i dont know what its happening, those are my examples:
os=CentOS
os="CentOS 6.7"
os=“CentOS6.7”
Where is foreman getting this param from?¿ i thought it is from os
facter
but it isnt:
[root@centos-test ~]# facter | grep CentOS
lsbdistdescription => CentOS release 6.7 (Final)
lsbdistid => CentOS
operatingsystem => CentOS
os => {“name”=>“CentOS”, “lsb”=>{“distid”=>“CentOS”,
“minordistrelease”=>“7”, “distcodename”=>“Final”,
“majdistrelease”=>“6”,
“distrelease”=>“6.7”,
“release”=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
“distdescription”=>“CentOS release 6.7 (Final)”},
“release”=>{“full”=>“6.7”, “major”=>“6”, “minor”=>“7”},
“family”=>“RedHat”}
Any suggestions?¿
Thanks
–
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 Ori,
Thanks for the answer but i already did, there is one of my test in the
screenshot.
Cheers
···
On Thursday, 17 March 2016 13:26:39 UTC+1, Ori Rabin wrote:
>
> Hi,
>
> The matcher uses the os's full name which in your case looks like "CentOS
> 6.7".
> In the screenshot you used: "os=CentOS".
> Can you try: os="CentOS 6.7" (put the double quotes after the os=) ?
>
> Thanks,
> Ori
>
>
> On Thu, Mar 17, 2016 at 1:43 PM, Fran Rodríguez > wrote:
>
>> Hi Marek,
>>
>> Thanks for the answer, im trying to use it here, in the smart class
>> parameter(see attachment). It seems that the os facter doesnt come from
>> foreman yaml.
>>
>> Cheers
>>
>> On Thursday, 17 March 2016 11:17:18 UTC+1, Marek Hulán wrote:
>>>
>>> Hello,
>>>
>>> in which filters do you try to match it? There should be auto-completion
>>> that
>>> usually helps, e.g. for filter on Host resource "os = CentOS" should
>>> work. The
>>> name of OS is usually updated by the value from facter but there's a
>>> custom
>>> logic in Foreman which combines multiple values from facter and does
>>> some
>>> conversions.
>>>
>>> Hope this helps
>>>
>>> --
>>> Marek
>>>
>>> On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
>>> > Hi group,
>>> >
>>> > I have found a problem trying to match the OS in the filters, ive
>>> tried
>>> > many things and i dont know what its happening, those are my examples:
>>> >
>>> > os=CentOS
>>> > os="CentOS 6.7"
>>> > os="CentOS6.7"
>>> >
>>> > Where is foreman getting this param from?¿ i thought it is from os
>>> facter
>>> > but it isnt:
>>> > [root@centos-test ~]# facter | grep CentOS
>>> > lsbdistdescription => CentOS release 6.7 (Final)
>>> > lsbdistid => CentOS
>>> > operatingsystem => CentOS
>>> > os => {"name"=>"CentOS", "lsb"=>{"distid"=>"CentOS",
>>> > "minordistrelease"=>"7", "distcodename"=>"Final",
>>> "majdistrelease"=>"6",
>>> > "distrelease"=>"6.7",
>>> >
>>> "release"=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
>>>
>>> > "distdescription"=>"CentOS release 6.7 (Final)"},
>>> > "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"},
>>> "family"=>"RedHat"}
>>> >
>>> > Any suggestions?¿
>>> > Thanks
>>>
>>> --
>> 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.
>>
>
>
I cant find the solution, how can i setup the os?¿ i think this is because
the value doesnt came from yaml.
Cheers.
···
On Thursday, 17 March 2016 19:36:14 UTC+1, Fran Rodríguez wrote:
>
> Hi Ori,
>
> Thanks for the answer but i already did, there is one of my test in the
> screenshot.
>
> Cheers
>
> On Thursday, 17 March 2016 13:26:39 UTC+1, Ori Rabin wrote:
>>
>> Hi,
>>
>> The matcher uses the os's full name which in your case looks like "CentOS
>> 6.7".
>> In the screenshot you used: "os=CentOS".
>> Can you try: os="CentOS 6.7" (put the double quotes after the os=) ?
>>
>> Thanks,
>> Ori
>>
>>
>> On Thu, Mar 17, 2016 at 1:43 PM, Fran Rodríguez >> wrote:
>>
>>> Hi Marek,
>>>
>>> Thanks for the answer, im trying to use it here, in the smart class
>>> parameter(see attachment). It seems that the os facter doesnt come from
>>> foreman yaml.
>>>
>>> Cheers
>>>
>>> On Thursday, 17 March 2016 11:17:18 UTC+1, Marek Hulán wrote:
>>>>
>>>> Hello,
>>>>
>>>> in which filters do you try to match it? There should be
>>>> auto-completion that
>>>> usually helps, e.g. for filter on Host resource "os = CentOS" should
>>>> work. The
>>>> name of OS is usually updated by the value from facter but there's a
>>>> custom
>>>> logic in Foreman which combines multiple values from facter and does
>>>> some
>>>> conversions.
>>>>
>>>> Hope this helps
>>>>
>>>> --
>>>> Marek
>>>>
>>>> On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
>>>> > Hi group,
>>>> >
>>>> > I have found a problem trying to match the OS in the filters, ive
>>>> tried
>>>> > many things and i dont know what its happening, those are my
>>>> examples:
>>>> >
>>>> > os=CentOS
>>>> > os="CentOS 6.7"
>>>> > os="CentOS6.7"
>>>> >
>>>> > Where is foreman getting this param from?¿ i thought it is from os
>>>> facter
>>>> > but it isnt:
>>>> > [root@centos-test ~]# facter | grep CentOS
>>>> > lsbdistdescription => CentOS release 6.7 (Final)
>>>> > lsbdistid => CentOS
>>>> > operatingsystem => CentOS
>>>> > os => {"name"=>"CentOS", "lsb"=>{"distid"=>"CentOS",
>>>> > "minordistrelease"=>"7", "distcodename"=>"Final",
>>>> "majdistrelease"=>"6",
>>>> > "distrelease"=>"6.7",
>>>> >
>>>> "release"=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
>>>>
>>>> > "distdescription"=>"CentOS release 6.7 (Final)"},
>>>> > "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"},
>>>> "family"=>"RedHat"}
>>>> >
>>>> > Any suggestions?¿
>>>> > Thanks
>>>>
>>>> --
>>> 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.
>>>
>>
>>
What i want to do it is this:
http://www.theforeman.org/manuals/1.8/index.html#4.2.6SmartMatchers
But i dont know why the os doesnt match, is there any way to debug this?¿
Now im using what the foreman doc says.
Cheers.
···
On Friday, 18 March 2016 13:33:11 UTC+1, Fran Rodríguez wrote:
>
> I cant find the solution, how can i setup the os?¿ i think this is because
> the value doesnt came from yaml.
>
> Cheers.
>
> On Thursday, 17 March 2016 19:36:14 UTC+1, Fran Rodríguez wrote:
>>
>> Hi Ori,
>>
>> Thanks for the answer but i already did, there is one of my test in the
>> screenshot.
>>
>> Cheers
>>
>> On Thursday, 17 March 2016 13:26:39 UTC+1, Ori Rabin wrote:
>>>
>>> Hi,
>>>
>>> The matcher uses the os's full name which in your case looks like
>>> "CentOS 6.7".
>>> In the screenshot you used: "os=CentOS".
>>> Can you try: os="CentOS 6.7" (put the double quotes after the os=) ?
>>>
>>> Thanks,
>>> Ori
>>>
>>>
>>> On Thu, Mar 17, 2016 at 1:43 PM, Fran Rodríguez >>> wrote:
>>>
>>>> Hi Marek,
>>>>
>>>> Thanks for the answer, im trying to use it here, in the smart class
>>>> parameter(see attachment). It seems that the os facter doesnt come from
>>>> foreman yaml.
>>>>
>>>> Cheers
>>>>
>>>> On Thursday, 17 March 2016 11:17:18 UTC+1, Marek Hulán wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> in which filters do you try to match it? There should be
>>>>> auto-completion that
>>>>> usually helps, e.g. for filter on Host resource "os = CentOS" should
>>>>> work. The
>>>>> name of OS is usually updated by the value from facter but there's a
>>>>> custom
>>>>> logic in Foreman which combines multiple values from facter and does
>>>>> some
>>>>> conversions.
>>>>>
>>>>> Hope this helps
>>>>>
>>>>> --
>>>>> Marek
>>>>>
>>>>> On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
>>>>> > Hi group,
>>>>> >
>>>>> > I have found a problem trying to match the OS in the filters, ive
>>>>> tried
>>>>> > many things and i dont know what its happening, those are my
>>>>> examples:
>>>>> >
>>>>> > os=CentOS
>>>>> > os="CentOS 6.7"
>>>>> > os="CentOS6.7"
>>>>> >
>>>>> > Where is foreman getting this param from?¿ i thought it is from os
>>>>> facter
>>>>> > but it isnt:
>>>>> > [root@centos-test ~]# facter | grep CentOS
>>>>> > lsbdistdescription => CentOS release 6.7 (Final)
>>>>> > lsbdistid => CentOS
>>>>> > operatingsystem => CentOS
>>>>> > os => {"name"=>"CentOS", "lsb"=>{"distid"=>"CentOS",
>>>>> > "minordistrelease"=>"7", "distcodename"=>"Final",
>>>>> "majdistrelease"=>"6",
>>>>> > "distrelease"=>"6.7",
>>>>> >
>>>>> "release"=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
>>>>>
>>>>> > "distdescription"=>"CentOS release 6.7 (Final)"},
>>>>> > "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"},
>>>>> "family"=>"RedHat"}
>>>>> >
>>>>> > Any suggestions?¿
>>>>> > Thanks
>>>>>
>>>>> --
>>>> 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.
>>>>
>>>
>>>
Hi group,
I think i found a bug with this, the fact which forman has it is shown like
this:
facts.os =
"familyRedHatlsbminordistrelease7distcodenameFinalmajdistrelease6distrelease6.7release:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarchdistdescriptionCentOS
release 6.7 (Final)distidCentOSreleaseminor7major6full6.7nameCentOS"
Any one know about this?
Cheers.
···
On Friday, 18 March 2016 14:06:44 UTC+1, Fran Rodríguez wrote:
>
> What i want to do it is this:
>
> http://www.theforeman.org/manuals/1.8/index.html#4.2.6SmartMatchers
>
> But i dont know why the os doesnt match, is there any way to debug this?¿
> Now im using what the foreman doc says.
>
> Cheers.
>
> On Friday, 18 March 2016 13:33:11 UTC+1, Fran Rodríguez wrote:
>>
>> I cant find the solution, how can i setup the os?¿ i think this is
>> because the value doesnt came from yaml.
>>
>> Cheers.
>>
>> On Thursday, 17 March 2016 19:36:14 UTC+1, Fran Rodríguez wrote:
>>>
>>> Hi Ori,
>>>
>>> Thanks for the answer but i already did, there is one of my test in the
>>> screenshot.
>>>
>>> Cheers
>>>
>>> On Thursday, 17 March 2016 13:26:39 UTC+1, Ori Rabin wrote:
>>>>
>>>> Hi,
>>>>
>>>> The matcher uses the os's full name which in your case looks like
>>>> "CentOS 6.7".
>>>> In the screenshot you used: "os=CentOS".
>>>> Can you try: os="CentOS 6.7" (put the double quotes after the os=) ?
>>>>
>>>> Thanks,
>>>> Ori
>>>>
>>>>
>>>> On Thu, Mar 17, 2016 at 1:43 PM, Fran Rodríguez >>>> wrote:
>>>>
>>>>> Hi Marek,
>>>>>
>>>>> Thanks for the answer, im trying to use it here, in the smart class
>>>>> parameter(see attachment). It seems that the os facter doesnt come from
>>>>> foreman yaml.
>>>>>
>>>>> Cheers
>>>>>
>>>>> On Thursday, 17 March 2016 11:17:18 UTC+1, Marek Hulán wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> in which filters do you try to match it? There should be
>>>>>> auto-completion that
>>>>>> usually helps, e.g. for filter on Host resource "os = CentOS" should
>>>>>> work. The
>>>>>> name of OS is usually updated by the value from facter but there's a
>>>>>> custom
>>>>>> logic in Foreman which combines multiple values from facter and does
>>>>>> some
>>>>>> conversions.
>>>>>>
>>>>>> Hope this helps
>>>>>>
>>>>>> --
>>>>>> Marek
>>>>>>
>>>>>> On Thursday 17 of March 2016 02:58:15 Fran Rodríguez wrote:
>>>>>> > Hi group,
>>>>>> >
>>>>>> > I have found a problem trying to match the OS in the filters, ive
>>>>>> tried
>>>>>> > many things and i dont know what its happening, those are my
>>>>>> examples:
>>>>>> >
>>>>>> > os=CentOS
>>>>>> > os="CentOS 6.7"
>>>>>> > os="CentOS6.7"
>>>>>> >
>>>>>> > Where is foreman getting this param from?¿ i thought it is from os
>>>>>> facter
>>>>>> > but it isnt:
>>>>>> > [root@centos-test ~]# facter | grep CentOS
>>>>>> > lsbdistdescription => CentOS release 6.7 (Final)
>>>>>> > lsbdistid => CentOS
>>>>>> > operatingsystem => CentOS
>>>>>> > os => {"name"=>"CentOS", "lsb"=>{"distid"=>"CentOS",
>>>>>> > "minordistrelease"=>"7", "distcodename"=>"Final",
>>>>>> "majdistrelease"=>"6",
>>>>>> > "distrelease"=>"6.7",
>>>>>> >
>>>>>> "release"=>":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch",
>>>>>>
>>>>>> > "distdescription"=>"CentOS release 6.7 (Final)"},
>>>>>> > "release"=>{"full"=>"6.7", "major"=>"6", "minor"=>"7"},
>>>>>> "family"=>"RedHat"}
>>>>>> >
>>>>>> > Any suggestions?¿
>>>>>> > Thanks
>>>>>>
>>>>>> --
>>>>> 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.
>>>>>
>>>>
>>>>
For the matchers, I'll repeat Ori's point - you have a bad match there.
Compare:
Your screenshot: "os=Centos"
Ori suggestion: os="CentOS 6.7"
These things are not the same - the matcher text is different, and the
quotes are in the wrong place. Can you confirm you've tried her suggestion?
For the facts, that looks like a representation of structured facts mashed
into a string. What version of Facter are you using, and where did you see
that string?
Hi Greg,
Im using the Ori's suggestion from beginning althought i tried other
options and its also the foreman's doc said. The version of the facter
[root@centos-test ~]# facter -v
2.4.6
and where im seeing that in the fact values of the host. Here one example
from one of my Debian host:
facts.os = "{"name"=>"Debian", "family"=>"Debian",
"release"=>{"major"=>"7", "minor"=>"6", "full"=>"7.6"},
"lsb"=>{"distcodename"=>"wheezy", "distid"=>"Debian",
"distdescription"=>"Debian GNU/Linux 7.6 (wheezy)", "distrelease"=>"7.6",
"majdistrelease"=>"7", "minordistrelease"=>"6"}}"
Cheers.
···
On Friday, 18 March 2016 14:21:02 UTC+1, Greg Sutcliffe wrote:
>
> For the matchers, I'll repeat Ori's point - you have a bad match there.
> Compare:
>
> Your screenshot: "os=Centos"
> Ori suggestion: os="CentOS 6.7"
>
> These things are not the same - the matcher text is different, and the
> quotes are in the wrong place. Can you confirm you've tried her suggestion?
>
> For the facts, that looks like a representation of structured facts mashed
> into a string. What version of Facter are you using, and where did you see
> that string?
>
The "os" matcher will not work against a fact called "os" because
internally, Foreman has an attribute called "os". This takes precedence
over the fact name. (Besides the problem that matchers won't work
properly with structured facts.)
It will only work against Foreman's description of the OS, which should
be the same string shown on the hosts or operating systems list.
···
On 18/03/16 13:28, Fran Rodríguez wrote:
> Hi Greg,
>
> Im using the Ori's suggestion from beginning althought i tried other
> options and its also the foreman's doc said. The version of the facter
> [root@centos-test ~]# facter -v
> 2.4.6
>
> and where im seeing that in the fact values of the host. Here one
> example from one of my Debian host:
>
> facts.os = "{"name"=>"Debian", "family"=>"Debian",
> "release"=>{"major"=>"7", "minor"=>"6", "full"=>"7.6"},
> "lsb"=>{"distcodename"=>"wheezy", "distid"=>"Debian",
> "distdescription"=>"Debian GNU/Linux 7.6 (wheezy)",
> "distrelease"=>"7.6", "majdistrelease"=>"7", "minordistrelease"=>"6"}}"
–
Dominic Cleal
dominic@cleal.org
Hi Dominic,
Thanks for the answer, then i dont understand what its happening because my
OS description is the same that in the matcher os = "CentOS 6.7", you can
see it on the attach.
Chees.
···
On Friday, 18 March 2016 15:37:11 UTC+1, Dominic Cleal wrote:
>
> On 18/03/16 13:28, Fran Rodríguez wrote:
> > Hi Greg,
> >
> > Im using the Ori's suggestion from beginning althought i tried other
> > options and its also the foreman's doc said. The version of the facter
> > [root@centos-test ~]# facter -v
> > 2.4.6
> >
> > and where im seeing that in the fact values of the host. Here one
> > example from one of my Debian host:
> >
> > facts.os = "{"name"=>"Debian", "family"=>"Debian",
> > "release"=>{"major"=>"7", "minor"=>"6", "full"=>"7.6"},
> > "lsb"=>{"distcodename"=>"wheezy", "distid"=>"Debian",
> > "distdescription"=>"Debian GNU/Linux 7.6 (wheezy)",
> > "distrelease"=>"7.6", "majdistrelease"=>"7", "minordistrelease"=>"6"}}"
>
> The "os" matcher will not work against a fact called "os" because
> internally, Foreman has an attribute called "os". This takes precedence
> over the fact name. (Besides the problem that matchers won't work
> properly with structured facts.)
>
> It will only work against Foreman's description of the OS, which should
> be the same string shown on the hosts or operating systems list.
>
> --
> Dominic Cleal
> dom...@cleal.org
>
Hi group,
Thats still not working so i think it is a bug but i dont know how to debug
the problem.
Any suggestions?¿
Cheers.
···
On Friday, 18 March 2016 17:16:49 UTC+1, Fran Rodríguez wrote:
>
> Hi Dominic,
>
> Thanks for the answer, then i dont understand what its happening because
> my OS description is the same that in the matcher os = "CentOS 6.7", you
> can see it on the attach.
>
> Chees.
>
>
> On Friday, 18 March 2016 15:37:11 UTC+1, Dominic Cleal wrote:
>>
>> On 18/03/16 13:28, Fran Rodríguez wrote:
>> > Hi Greg,
>> >
>> > Im using the Ori's suggestion from beginning althought i tried other
>> > options and its also the foreman's doc said. The version of the facter
>> > [root@centos-test ~]# facter -v
>> > 2.4.6
>> >
>> > and where im seeing that in the fact values of the host. Here one
>> > example from one of my Debian host:
>> >
>> > facts.os = "{"name"=>"Debian", "family"=>"Debian",
>> > "release"=>{"major"=>"7", "minor"=>"6", "full"=>"7.6"},
>> > "lsb"=>{"distcodename"=>"wheezy", "distid"=>"Debian",
>> > "distdescription"=>"Debian GNU/Linux 7.6 (wheezy)",
>> > "distrelease"=>"7.6", "majdistrelease"=>"7", "minordistrelease"=>"6"}}"
>>
>> The "os" matcher will not work against a fact called "os" because
>> internally, Foreman has an attribute called "os". This takes precedence
>> over the fact name. (Besides the problem that matchers won't work
>> properly with structured facts.)
>>
>> It will only work against Foreman's description of the OS, which should
>> be the same string shown on the hosts or operating systems list.
>>
>> --
>> Dominic Cleal
>> dom...@cleal.org
>>
>
Hi,
you can use: foreman-rake console
search for your os and check what is it's title, that would be what you
need to use in the matcher.
So probably run: Operatingsystem.where(:name => 'CentOS', :major => '6',
:minor => '7').first.title.
Also - you only have one matcher for this parameter right? on the os?
and what do you see in the host's yaml? the default value of the parameter?
Thanks,
Ori
···
On Tue, Mar 22, 2016 at 12:37 PM, Fran Rodríguez wrote:
Hi group,
Thats still not working so i think it is a bug but i dont know how to
debug the problem.
Any suggestions?¿
Cheers.
On Friday, 18 March 2016 17:16:49 UTC+1, Fran Rodríguez wrote:
Hi Dominic,
Thanks for the answer, then i dont understand what its happening because
my OS description is the same that in the matcher os = “CentOS 6.7”, you
can see it on the attach.
Chees.
On Friday, 18 March 2016 15:37:11 UTC+1, Dominic Cleal wrote:
On 18/03/16 13:28, Fran Rodríguez wrote:
Hi Greg,
Im using the Ori’s suggestion from beginning althought i tried other
options and its also the foreman’s doc said. The version of the facter
[root@centos-test ~]# facter -v
2.4.6
and where im seeing that in the fact values of the host. Here one
example from one of my Debian host:
facts.os = “{“name”=>“Debian”, “family”=>“Debian”,
“release”=>{“major”=>“7”, “minor”=>“6”, “full”=>“7.6”},
“lsb”=>{“distcodename”=>“wheezy”, “distid”=>“Debian”,
“distdescription”=>“Debian GNU/Linux 7.6 (wheezy)”,
“distrelease”=>“7.6”, “majdistrelease”=>“7”,
“minordistrelease”=>“6”}}”
The “os” matcher will not work against a fact called “os” because
internally, Foreman has an attribute called “os”. This takes precedence
over the fact name. (Besides the problem that matchers won’t work
properly with structured facts.)
It will only work against Foreman’s description of the OS, which should
be the same string shown on the hosts or operating systems list.
–
Dominic Cleal
dom...@cleal.org
–
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.