- From: Jeff Blaine <
>
- To:
- Subject: [chef] Re: Get content from cookbook_file
- Date: Tue, 21 Oct 2014 10:14:24 -0400
On 10/21/2014 7:13 AM,
wrote:
>
Hello,
>
>
i copy private and public keys from my cookbook files with:
>
>
remote_directory "/home/jenkins/.ssh" do
>
files_mode '0600'
>
files_owner 'jenkins'
>
files_group 'jenkins'
>
mode '0700'
>
owner 'jenkins'
>
source "deploy_keys"
>
notifies :run, "execute[fix-pubkey-rights]", :immediately
>
end
>
>
execute "fix-pubkey-rights" do
>
cwd "/home/jenkins/.ssh"
>
command "chmod 0644 *.pub"
>
action :nothing
>
end
>
>
Now i wan't iterate over all private keys and use the content and name with
>
>
jenkins_private_key_credentials "#{filename}" do
>
description "#{filename} pivate key for github access"
>
private_key "#{content}"
>
end
>
>
Hoiw can i do this?
You use a databag to store the data instead of cookbook files.
--
Jeff Blaine
kickflop.net
PGP/GnuPG Key ID: 0x0C8EDD02
Archive powered by MHonArc 2.6.16.