[chef] Re: Re: Re: Re: knife search weirdness. What am I doing wrong here?


Chronological Thread 
  • From: andi abes < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: knife search weirdness. What am I doing wrong here?
  • Date: Tue, 14 Feb 2012 18:13:11 -0500

hu!
Guess I'm out of date... I recall this was a restriction at some point. Is this a recent change? (or am I loosing my mind?)

On Tue, Feb 14, 2012 at 5:45 PM, Daniel DeLeo < "> > wrote:


On Tuesday, February 14, 2012 at 2:40 PM, John Alberts wrote:

> Yeah, I think you are right.
>
> Well, this kind of sucks. :( It ruins my idea of trying to search for
> a cronjob. There is no way to actually have knife search that field.
> I tried using '*chef' to match the chef-client line, but that returned
> 0 results as well.
>
> Does anyone know if there is a way to match a substring in a value?
>
> So if my key has a value "blah blah chef-client blah blah", I can find it?
>
> John
>
>
> On Tue, Feb 14, 2012 at 2:28 PM, andi abes < "> (mailto: "> )> wrote:
> > I think you can only use one * in a search term.
> >
> > knife search node "crontabs_root_all_lines:*chef
> > or crontabs_root_all_lines:chef*" -a crontabs
>

You can definitely have more than one wildcard character in a search term. For example:

https://github.com/danielsdeleo/knife-plugins/blob/master/grep.rb#L20

As for your search issue, putting too much data in the node will probably trigger this bug:

http://tickets.opscode.com/browse/CHEF-2346


--
Dan DeLeo





Archive powered by MHonArc 2.6.16.

§