- From: Noah Kantrowitz <
>
- To:
- Subject: [chef] Re: Re: Re: passing attributes during runtime
- Date: Tue, 4 Feb 2014 11:53:48 -0800
No, the argument to -j is a file containing JSON.
--Noah
On Feb 4, 2014, at 11:00 AM, Ameya Savale
<
>
wrote:
>
Hi Ranjib,
>
>
So you were able to pass in attributes using the -j option like so:
>
>
chef-client -j {"key":"value"}
>
>
- Thanks
>
Ameya
>
>
>
On Tue, Feb 4, 2014 at 10:40 AM, Ranjib Dey
>
<
>
>
wrote:
>
you can invoke chef-client with -j option to pass custom attributes
>
(including the run list). This is the exact mechanism using which chef
>
bootstraps (install chef and other stuff on a virgin server). If you dont
>
want the converged node state to be saved back to the chef server, you can
>
use run list override (-o) option.
>
I have used same workflows to setup development and other type of instances
>
where I want to reuse my chef scripts but dont want the target chef server
>
to be under chef server, or actively managed (one time setup).
>
>
cheers
>
ranjib
>
>
>
On Tue, Feb 4, 2014 at 10:19 AM, Ameya Ameya Savale
>
<
>
>
wrote:
>
Hi Guys,
>
>
I had a question, which I couldn't seem to find an answer for in earlier
>
posts.
>
I might have been searching the wrong keywords, but here it is. Is it
>
possible
>
to run the chef-client command and pass in custom attributes inline. I need
>
to
>
write a recipe which takes in a name and a port number and creates certain
>
directories and files and setups up configuration on the host using the name
>
and the port number.
>
>
I recently started using chef so everything is quite new to me. I read in
>
multiple places that you can do it using a json file. If I understood it
>
correctly then it seems I would need to create a separate json file for
>
every
>
different name and post number that I want to pass in or update the same
>
json
>
file before running the recipe with the new name and port, this seems very
>
tedious.
>
>
What would be the correct way of approaching this problem?
>
>
- Thanks
>
Ameya
>
>
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.