[chef] Re: Re: Re: Get available recipes and apply them to a node


Chronological Thread 
  • From: Thom May < >
  • To:
  • Subject: [chef] Re: Re: Re: Get available recipes and apply them to a node
  • Date: Thu, 18 Feb 2010 17:28:13 +0000

I think you want to to post_rest to '/nodes/', since you're creating a
new node. If you're saving an existing node,
you should put_rest to '/nodes/hostname_domain_tld'  (ie, gsub(".","_") on 
fqdn)
-T

On Thu, Feb 18, 2010 at 17:15, Kristin Thomsen 
< >
 wrote:
> Hi,
>
> thanks for that! I didn't know that run_list can deal with strings :)
> Now I got one problem left: when I try to make a POST to the server, I get
> a 404-Error and I don't know why.
> I'm doing a
>
> rest.post_rest('http://localhost:4000/nodes/' + node.name, node)
>
> Any idea why this happens?
>
>
>> Hi,
>> you don't need a chef::recipe - run_list is an array of strings:
>http://gist.github.com/307825
>>
>> -Thom
>>
>> On Thu, Feb 18, 2010 at 15:50,  
>> < >
>>  wrote:
>>> Hi again!
>>>
>>> I want to get all available recipes and apply them to a node. How can I
>>> do
>>> that? I tried it by loading a cookbook and accessing the recipes of that
>>> cookbook. But it seems I can only recieve a recipes name by doing so -
>>> but I
>>> need a Chef::Recipe for doing node.run_list << a_recipe!
>>>
>>> Any suggestions?
>>>
>>> PS: i'm using chef 0.7.16
>>>
>>
>>
>
>



Archive powered by MHonArc 2.6.16.

§