- From: "Mark J. Reed" <
>
- To: "
" <
>
- Subject: [chef] Re: Pass an attrribute in the knife bootstrap command
- Date: Mon, 5 Dec 2011 20:18:04 -0500
Its kludgy, but you could easily script (either via a knife plugin or a shell script) a series of: create role with desired attr, bootstrap host with said role in run list, remove role from run list on newly-created nose, delete role.
Or you could modify the bootstrap template, which ultimately builds a blob of JSON to feed to the initial chef-client run. You'd still need to get the extra attr from the command line into the template render, though. A custom plugin would be cleanest but you could also fake it with nonce environment variables (CHEF_EXTRA=value knife bootstrap ...).
On Monday, December 5, 2011, Chris Walters <
">
> wrote:
> My 2 cents: I would also like to be able to set tags for a node via knife bootstrap.
> -chris
>
> On Mon, Dec 5, 2011 at 1:51 PM, Van Fossan,Randy <
">
> wrote:
>>
>> Jake,
>>
>> Yes, that would work and was my fallback plan. I was just trying to be more efficient. Also, since the last recipe removes the role from the runlist, I will now have to deal with 2 roles.
>>
>> Thanks
>> Randy
>>
>> -----Original Message-----
>> From: Jake Vanderdray [mailto:
">
]
>> Sent: Wednesday, November 30, 2011 11:04 AM
>> To:
">
>> Subject: [chef] Re: Pass an attrribute in the knife bootstrap command
>>
>> Create a new role that overrides the attribute and includes the normal role in it's runlist. Then assign your master node that role instead of the other. Would that work for you?
>>
>> Jake.
>>
>> On Tue, Nov 29, 2011 at 5:01 PM, Van Fossan,Randy <
">
> wrote:
>> > Is there a way to pass an attribute in the knife bootstrap command?
>> >
>> > For example, I have a role that has a recipe to partition and format
>> > disks differently on the master node as opposed to the data nodes.
>> > The recipe has a default attribute set for a data node.
>> >
>> > I would like to override that default attribute with the knife
>> > bootstrap command (which also installs ruby, the chef-client and
>> > configures the client).
>> >
>> > Any ideas?
>> >
>> > Randy
>> >
>> >
>> >
>>
>>
>
>
--
Mark J. Reed <
">
>
Archive powered by MHonArc 2.6.16.