- From: Juan Jesús Ojeda Croissier <
>
- To:
- Subject: [chef] Re: Re: Re: multiple run_list items with knife??? knife node run_list remove xyz.abc.org 'recipe[chef-client]'
- Date: Wed, 14 Mar 2012 05:15:44 +0000
On Tue, Mar 13, 2012 at 3:44 PM, Steven Danna
<
>
wrote:
>
> You can use knife exec until the fix gets merged
>
>
>
> knife exec -E 'n=search(:node, "name:coolnode").first; n.run_list =
>
> Chef::RunList.new("role[foo]", "role[bar]"); n.save'
>
>
Note that this will wipe out the existing run list entries. Something
>
like this may work, but it is a bit ugly:
>
>
knife exec -E 'n=nodes.show("NODENAME"); ["role[foo2]",
>
"role[bar2]"].each { |i| n.run_list << i }; n.save'
Actually, the ticket was for adding more than one item to the
run_list, but there was no ticket about removing more than one item,
so I've added a ticket for that:
http://tickets.opscode.com/browse/CHEF-2976
I also added a pull-request with a posible implementation. I hope this
helps. Any feedback will be very welcome.
Thanks
--
Juanje
Archive powered by MHonArc 2.6.16.