- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Changing a node attribute from another node
- Date: Mon, 2 Aug 2010 09:17:26 -0700
Once you have the Node object, you need to call save on it:
node = search('query').first
node["new_attribute"] = "hello from another node"
node.save
but in general nodes aren't permitted to modify other nodes. To make
it work, you'd have to make that node's API client an admin, which
isn't something to do lightly. Maybe you can tell us more about your
use case to see if there's an easier way to get the outcome you want?
Dan DeLeo
On Fri, Jul 30, 2010 at 2:14 AM, Alexander Smirnov
<
>
wrote:
>
Hi,
>
>
Is there a way to change an attribute of some node from recipe on another
>
node?
>
When I use the set method on node object obtained via search method it
>
changes locally but doesn't get saved in the DB.
>
>
Thanks!
>
- [chef] Re: Changing a node attribute from another node, Daniel DeLeo, 08/02/2010
Archive powered by MHonArc 2.6.16.