- From: Russ Lavoy <
>
- To: "
" <
>
- Subject: [chef] Re: Re: Issue with encrypted data bags
- Date: Tue, 18 Jun 2013 13:20:41 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=nCIwfXbSaakEVWuJ4muX24+sOiV46y/eg5eytXN5kP/r/kD9J6VkSso6yWYpPEbNqyz8LiAS4lBYGS7ZjR4ZX/jTudYmYQjvIGfHFugIhBVszg39EqTWaMyQlkoboJs2ENrzBjjEsg5Jaqv9XeRNSJuSV4vBfLYwr8M94qI6K2c=;
I have also tried that as well. It still comes back with the same error.
Russ
From: Nic Grayson <
>
To: Russ Lavoy <
>; "
" <
>
Sent: Tuesday, June 18, 2013 3:13 PM
Subject: [chef] Re: Issue with encrypted data bags
When you use a secret file you don't need secret in the EncryptedDataBagItem.load call. Here is an example
data_bag = EncryptedDataBagItem.load("bag_name", "item_name")
content = data_bag["item1"]
Let me know if this is unclear.
Nic
On June 18, 2013 at 2:44:22 PM, Russ Lavoy (
) wrote:
I am having an issue with encrypted data bags with chef 11.4.4 and vagrant 1.2.2.
I was able to successfully create, show encrypted and decrypted data bags with no issue via knife.
But once I dropped it into a recipe it threw me an error.
Here is the portion of the recipe that does not error.
secret = Chef::EncryptedDataBagItem.load_secret("#{node[:production][:secretpath]}") - This spits back the contents of the /etc/chef/encrypted_data_bag_secret
When I add the below it throws an error
pass_keys = Chef::EncryptedDataBagItem.load("production", "passwords", secret)
<error>
[2013-06-18T18:43:48+00:00] FATAL: Chef::Exceptions::ValidationFailed: Data Bag Items must contain a Hash or Mash!
</error>
Not sure why I am getting this issue.
Any help would be good.
Thanks!
Archive powered by MHonArc 2.6.16.