Defined Type: opengrok::project

Defined in:
manifests/project.pp

Overview

Define opengrok::project

This define lets you add git projects to OpenGrok

Examples:

Defining a git project for OpenGrok

opengrok::project { 'puppet-opengrok:
  ensure => 'latest',
  source => 'https://github.com/jordanconway/puppet-opengrok.git',
}

Parameters:

  • ensure (Enum['present', 'absent', 'latest']) (defaults to: latest)

    Ensure the project is included, latest or absent. Valid Options: strings 'present', 'absent', 'latest'. Example Value: 'latest'

  • provider (Enum['git']) (defaults to: 'git')

    The vcs provider for the project. CURRENTLY ONLY SUPPORTS 'git' Valid Options: String. Example Value: 'git'

  • source (Pattern[/^(https?|git)[^\s]*\.git$/])

    A link to the git repo being added. Valid Options: String Example Value: 'https://github.com/jordanconway/puppet-opengrok.git'

  • revision (Optional[String[1]]) (defaults to: undef)

    A git revision reference to pin the repo to. Valid Options: String Example Value: '9db36f3c12cb57bde8c2cdf4b66bf1745bea9968'



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'manifests/project.pp', line 20

define opengrok::project (
  Pattern[/^(https?|git)[^\s]*\.git$/] $source,
  Enum['present', 'absent', 'latest'] $ensure = latest,
  Enum['git'] $provider = 'git',
  Optional[String[1]] $revision = undef,
){
  include ::opengrok::params

  vcsrepo { "/var/opengrok/src/${title}":
    ensure   => $ensure,
    provider => $provider,
    source   => $source,
    revision => $revision,
  }


}