- From: Tetsu Soh <
>
- To:
- Subject: [chef] Re: Chef solo setting default values
- Date: Thu, 30 Aug 2012 23:17:34 +0900
Hi,
I met same problem and am hoping to find answer from here.
Thank you.
Tetsu
On Aug 29, 2012, at 4:31 PM, Jan Bares
<
>
wrote:
>
Hi,
>
>
Can someone help me to understand this strange behaviour? As you can see
>
bellow, value of node[:test_value2]["name"] magically disappears after I
>
reference it for the first time. It should print:
>
[2012-08-29T09:25:43+02:00] INFO: [jan] value, value.
>
But it prints:
>
[2012-08-29T09:25:43+02:00] INFO: [jan] value, .
>
>
If this is known limitation of Chef, how can I reuse configuration data
>
without retyping them?
>
>
Thanks, Jan
>
>
attributes/default.rb
>
=====================
>
default[:test1] = "test"
>
default[:test_value1] = default[:test1]
>
>
default[:test2] = {"name" => "value"}
>
default[:test_value2] = default[:test2]
>
>
recipes/default.rb
>
==================
>
Chef::Log.info("[jan] #{node[:test_value1]}, #{node[:test_value1]}.")
>
Chef::Log.info("[jan] #{node[:test_value2]["name"]},
>
#{node[:test_value2]["name"]}.")
>
>
Output
>
======
>
[2012-08-29T09:25:42+02:00] INFO: *** Chef 10.12.0 ***
>
[2012-08-29T09:25:43+02:00] INFO: Setting the run_list to
>
["recipe[soa::default]
>
"] from JSON
>
[2012-08-29T09:25:43+02:00] INFO: Run List is [recipe[soa::default]]
>
[2012-08-29T09:25:43+02:00] INFO: Run List expands to [soa::default]
>
[2012-08-29T09:25:43+02:00] INFO: Starting Chef Run for prgsoa001
>
[2012-08-29T09:25:43+02:00] INFO: Running start handlers
>
[2012-08-29T09:25:43+02:00] INFO: Start handlers complete.
>
[2012-08-29T09:25:43+02:00] INFO: [jan] test, test.
>
[2012-08-29T09:25:43+02:00] INFO: [jan] value, .
>
[2012-08-29T09:25:43+02:00] INFO: Chef Run complete in 0.010143 seconds
>
[2012-08-29T09:25:43+02:00] INFO: Running report handlers
>
[2012-08-29T09:25:43+02:00] INFO: Report handlers complete
>
>
As you can see, the
>
>
Jan Bareš
>
Calypso Lead Developer
>
>
In association with
>
WOOD & Company Financial Services, a.s.
>
Palladium, Náměstí Republiky 1079/1a
>
110 00 Prague, Czech Republic
>
Tel. +420 222 096 111
>
Direct +420 222 096 378
>
Fax. +420 222 096 222
>
>
>
>
>
>
>
DISCLAIMER
>
WOOD & Company Financial Services, a.s. and its branches are authorized and
>
regulated by the CNB as Home State regulator and in Poland by the KNF, in
>
Romania by the CNVM, in Slovakia by the NBS and in the UK by the FSA as
>
Host State regulators. For further information about WOOD & Co., its
>
investment services, financial instruments and associated risks, safeguard
>
client assets (incl. compensation schemes) and contractual relationship
>
please see our website at www.wood.cz under section Corporate Governance.
>
>
Unless otherwise stated, this transmission is neither an offer nor the
>
solicitation of an offer to sell or purchase any investment. All estimates,
>
opinions and other information contained herein are subject to change
>
without notice and are provided in good faith but without legal
>
responsibility or liability. Opinion may be personal to the author and may
>
not reflect the opinions of WOOD & Co. Communications from sales persons,
>
sales traders or traders should not be regarded as investment research and
>
may contain opinions or trading ideas which are different from WOOD & Co.
>
investment research opinions.
>
>
This e-mail and any attachments are confidential and may be privileged or
>
otherwise protected from disclosure. If you are not a named addressee you
>
must not use, disclose, distribute, copy, print or rely on this e-mail and
>
any of its attachments. Please notify the sender that you have received
>
this email by mistake by replying to the email, and then delete the email
>
and any copies of it. Although WOOD & Co. routinely screens e-mails for
>
viruses, addressees should scan this e-mail and any attachments for
>
viruses. WOOD & Co. makes no representation or warranty as to the absence
>
of viruses in this e-mail or any attachments. Please note that to ensure
>
regulatory compliance and for the protection of our clients and business,
>
we may monitor and read e-mails sent to and from our server(s).
>
>
Archive powered by MHonArc 2.6.16.