Puppet Class: opengrok::config
- Defined in:
- manifests/config.pp
Overview
Class opengrok::config
This class is called from opengrok for service config.
}
Parameters:
-
opengrok_dir
(Any)
—
Specifies the directory to install the OpenGrok binaries to. Valid options: Absolute Path. Example Value: '/opt/opengrok'
-
projects
(Any)
—
A hash of git projects to be served by OpenGrok. This can is an alternative to defining opengrok::project types Valid options: Hash
-
catalina_home
(Any)
—
Specifies the catalina_home directory of your tomcat install, ie: where the tomcat 'webapps' directory resides. Valid options: Absolute path. Example Value: '/var/lib/tomcat'
-
body_text
(Any)
—
Replaces the default body text for opengrok on the main page. Valid options: String. Example Value: 'Check out our
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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
# File 'manifests/config.pp', line 26 class opengrok::config ( $projects, $opengrok_dir, $catalina_home, $body_text, $config_hash, ){ #get sources if is_hash($projects) { $projects.each |$resource, $options| { ::opengrok::project { $resource: * => $options, notify => Exec['opengrok_update'], require => Exec['opengrok_deploy'], } } } # Configure body text file {"${catalina_home}/webapps/source/index_body.html": ensure => present, content => template('opengrok/index_body.html.erb'), mode => '0644', require => Exec['opengrok_deploy'], } #fix opengrok scipt file {"${opengrok_dir}/bin/OpenGrok": ensure => present, content => template('opengrok/OpenGrok.erb'), mode => '0555', } # OpenGrok config file file {'/var/opengrok/etc/opengrok.conf': ensure => present, content => template('opengrok/opengrok.conf.erb'), mode => '0644', require => Exec['opengrok_deploy'], } #run depoloy script exec { 'opengrok_deploy': command => "${opengrok_dir}/bin/OpenGrok deploy", creates => '/var/lib/tomcat/webapps/source.war', require => File["${opengrok_dir}/bin/OpenGrok"], } #run index exec { 'opengrok_index': command => "${opengrok_dir}/bin/OpenGrok index", creates => '/var/opengrok/etc/configuration.xml', environment => 'OPENGROK_CONFIGURATION=/var/opengrok/etc/opengrok.conf', require => [ Exec['opengrok_deploy'], File["${opengrok_dir}/bin/OpenGrok"], File['/var/opengrok/etc/opengrok.conf'], ], } # Update index exec { 'opengrok_update': command => "${opengrok_dir}/bin/OpenGrok update", refreshonly => true, environment => 'OPENGROK_CONFIGURATION=/var/opengrok/etc/opengrok.conf', require => [ Exec['opengrok_index'], File["${opengrok_dir}/bin/OpenGrok"], File['/var/opengrok/etc/opengrok.conf'], ], } }
Generated on Tue Mar 28 11:00:31 2017 by
yard
0.9.8 (ruby-2.3.3).