Skip to main content
summaryrefslogtreecommitdiffstats
blob: 136d1793b570e0def1a3c41800c250f656755101 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class trac {
  $base = "/home/tools/trac"
  $userOwner = "tools"
  $userGroup = "tools"

  /* Common requirements for all Trac instances */

  exec { "apt-get update":
    command => "apt-get update",
    onlyif  => "find /var/lib/apt/lists/ -mtime -7 | (grep -q Package; [ $? != 0 ])",
  }

  /* Trac automatically provisions during install "python-genshi" */

  $requirements = ["apache2", "libapache2-mod-fcgid", "python-pysqlite2", "python-setuptools", "python-subversion", "subversion",]

  package { $requirements:
    ensure  => "installed",
    require => Exec["apt-get update"],
  }

  service { "apache2":
    ensure  => running,
    require => Package["apache2"],
  }

  exec { "Enable auth_digest module":
    command => "a2enmod auth_digest",
    require => Package["apache2"],
    creates => "/etc/apache2/mods-enabled/auth_digest.load",
  }

  exec { "Enable fcgid module":
    command => "a2enmod fcgid",
    require => Package["libapache2-mod-fcgid"],
    creates => "/etc/apache2/mods-enabled/fcgid.load",
  }

  exec { "Enable ssl module":
    command => "a2enmod ssl",
    require => Package["apache2"],
    creates => "/etc/apache2/mods-enabled/ssl.load",
  }

  file { "/etc/apache2/sites-enabled/001-default-ssl":
    ensure  => link,
    target  => "/etc/apache2/sites-available/default-ssl",
    require => Package["apache2"],
    notify  => Service["apache2"],
  }

  file { "/etc/apache2/conf.d/python.conf":
    content => "DefaultInitEnv PYTHON_EGG_CACHE /tmp/eggs",
    require => Package["apache2"],
    notify  => Service["apache2"],
  }
  
  exec { "prepare trac":
    command => "echo Trac pre-requisites are installed",
    require => Package[$requirements],
  }
  
}

Back to the top