Add symlink on local git directory

We need that for zuul to properly fetch references
with /p/ path

Change-Id: If5cda9d3924cc4577d9a44e8cac6fef63cc4d17d
This commit is contained in:
Yolanda Robla 2015-10-02 16:18:32 +02:00 committed by yolanda.robla
parent fc3c6089f9
commit 546dc76865
2 changed files with 13 additions and 1 deletions

View File

@ -121,7 +121,9 @@ class cgit(
require => User['cgit'],
}
file { '/var/lib/git':
$local_git_dir = '/var/lib/git'
file { $local_git_dir:
ensure => directory,
owner => 'cgit',
group => 'cgit',
@ -129,6 +131,12 @@ class cgit(
require => User['cgit'],
}
file { "${local_git_dir}/p":
ensure => link,
target => $local_git_dir,
require => File[$local_git_dir],
}
::httpd::vhost { $vhost_name:
port => $https_port,
serveraliases => $serveraliases,

View File

@ -128,6 +128,10 @@ describe 'puppet-cgit module', :if => ['fedora', 'redhat'].include?(os[:family])
end
end
describe file('/var/lib/git/p') do
it { should be_linked_to '/var/lib/git' }
end
describe file('/usr/lib/systemd/system/git-daemon.socket'), :if => ['fedora', 'redhat'].include?(os[:family]) && os[:release] >= '7' do
it { should be_file }
it { should be_owned_by 'root' }