Home:ALL Converter>Puppet vcsrepo behind firewall?

Puppet vcsrepo behind firewall?

Ask Time:2013-04-11T07:38:22         Author:pcm

Json Formatter

Trying to use vcsrepo module from puppet to install a GIT repository for devstack. Using https://github.com/... But am behind a firewall. There is a proxy server available for http, https, and FTP access to the Internet.

Is there a way to include the proxy, when using this module? I didn't find anything in the vcsrepo that seems to work. Willing to tweak (hack) the module, if needed.

Author:pcm,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15938385/puppet-vcsrepo-behind-firewall
james :

You could look in the module vcsrepo/lib/puppet/provider/vcsrepo/git.rb\n\nnear the bottom of the file at:\n\ndef git_with_identity(*args)\n\n\nadd the following just under the above line:\n\nif @resource.value(:http_proxy)\n ENV['http_proxy'] = @resource.value(:http_proxy)\n ENV['https_proxy'] = @resource.value(:http_proxy)\nend\n\n\nNext edit vcsrepo/lib/puppet/type/vcsrepo.rb - before the last end add: \n\n newparam :http_proxy do\n desc \"http proxy to use to communicate with the outside world\"\nend\n\n\nNow in your puppet manifest you can add http_proxy var:\n\nvcsrepo { '/var/www/blash':\n ensure => present,\n provider => git,\n http_proxy => 'http://prxy.local:8080',\n require => Class['git-core'],\n source => 'http://github.com/blah/blah.git';\n }\n",
2013-06-12T13:47:26
yy