Sou capaz de usar o PuppetLabs vcsrepo
para clonar repositórios públicos de git, mas também gostaria de clonar repositórios particulares, usando as chaves SSH do host.
Como seria a configuração Vagrantfile
e / ou manifests/default.pp
para isso?
Não posso ajudar com a parte Puppet, mas você pode encaminhar o Agente SSH configurando:
Vagrant.configure("2") do |config|
config.ssh.forward_agent = true
# ...
end
Dessa forma, as conexões SSH (também feitas pelo git) tentam usar suas chaves privadas do host.
Funciona na minha máquina!
Vagrantfile:
upgrade-puppet.sh:
bootstrap.sh:
manifestos / default.pp:
fonte
bootstrap.sh
precisa serbootstrap.rb
para que isso funcione.Eu sei que você está usando o Puppet, mas eu o instalei e executei usando este script bash (
provisioners/shell/application.setup.sh
):Pode-se facilmente convertê-lo em um manifesto de marionetes ...
Juntamente com isso
Vagrantfile
O ponto principal para mim foi que, quando executei:
Não deu certo. Como se as chaves não fossem passadas usando
su
. Então, eu clonei o repositório como root e depois mudei de propriedade.Este post foi muito útil.
fonte