aboutsummaryrefslogtreecommitdiff
path: root/manifests/cgit.pp
blob: 9c1c710b7ea98b3a92231aae042595db6e11c70e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class git::cgit(
  $css        = '/cgit-css/cgit.css',
  $logo       = '/cgit.png',
  $root_title = 'Git Repository Browser',
  $root_desc  = 'a fast webinterface for the git dscm',
  $clone_url  = 'https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL git@$HTTP_HOST:$CGIT_REPO_URL'
) {
  package { 'cgit':
    ensure  => $::lsbdistcodename ? {
      'wheezy' => absent,
      default  => present,
    }
  }

  # Old python2 dependencies
  #package { [ 'python-pygments', 'python-markdown' ]:
  #  ensure => present,
  #}

  # For synthax highlighting
  package { [ 'python3-pygments', 'python3-markdown' ]:
    ensure => present,
  }

  file { '/etc/cgitrc':
    owner   => "root",
    group   => "root",
    mode    => '0644',
    ensure  => present,
    content => template('git/cgitrc.erb'),
  }
}