0

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.

Arora20
  • 983
  • 10
  • 17
  • What is your end goal? You cannot modify any of those things with app_git (or poise-git which it is built on). – coderanger May 28 '18 at 07:36
  • I need to download deploy_key at a particular location, otherwise, my servers won`t work. – Arora20 May 28 '18 at 07:51
  • 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 :) – coderanger May 28 '18 at 09:56

1 Answers1

0

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 :)

coderanger
  • 52,400
  • 4
  • 52
  • 75