Customizing deploy key and ssh wrapper path for git cloning through application_git cookbook

92 views Asked by At

I am using chef for managing servers. Earlier I was using application cookbook for cloning repository. But now in higher version of application cookbook, this support is moved to new cookbook application_git. I am using 1.1.0

Issue -

  1. I want to change the path of deploy key
  2. Contents of ssh_wrapper
  3. Path of ssh_wrapper.

What all I have tried - Current code -

application 'accounts' do
  action :deploy
  path <somepath>
  owner 'nobody'
  group 'nogroup'
  git 'name' do
    repository <repopath>
    revision <value>
    deploy_key deploy_key
 end
end 

I am not able to find if I need to pass path using ssh_wrapper_path or ssh_wrapper or deploy_key_path. All are failing.

Currently, I am able to get keys and wrapper but at a wrong place.

1

There are 1 answers

0
coderanger On

Copied from comments:

Then don't use app_git. You'll have to handle writing it yourself, usually with a file resource or similar. app_git's deploy key handling is only for the purposes of Chef's git operations, if your app itself needs to also touch git, then you need to do that yourself :)