Skip to content

Instantly share code, notes, and snippets.

@cthorley
Created September 12, 2016 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cthorley/84be0ebcd2d2f8b3ad830823597e8539 to your computer and use it in GitHub Desktop.
Save cthorley/84be0ebcd2d2f8b3ad830823597e8539 to your computer and use it in GitHub Desktop.
chef resource
-------------
template "/path/to/credentials.json" do
source 'credentials.json.erb'
owner <user>
group <user>
mode '0400'
variables({
:private_key => private_key
})
end
credentials.json.erb
--------------------
{
"id": "site",
"credentials": {
"private_key": "<rsa_private_key>",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment