Puppet Class: stash::gc

Defined in:
manifests/gc.pp

Overview

Parameters:

  • ensure (Any) (defaults to: 'present')
  • path (Any) (defaults to: '/usr/local/bin/git-gc.sh')
  • minute (Any) (defaults to: 0)
  • hour (Any) (defaults to: 0)
  • weekday (Any) (defaults to: 'Sunday')
  • user (Any) (defaults to: $stash::user)


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
# File 'manifests/gc.pp', line 19

class stash::gc(
  $ensure  = 'present',
  $path    = '/usr/local/bin/git-gc.sh',
  $minute  = 0,
  $hour    = 0,
  $weekday = 'Sunday',
  $user    = $stash::user,
  ) {

  file { $path:
    ensure  => $ensure,
    content => template('stash/git-gc.sh.erb'),
    mode    => '0755',
  } ->

  cron { 'git-gc-stash':
    ensure  => $ensure,
    command => "${path} &>/dev/null",
    user    => $user,
    minute  => $minute,
    hour    => $hour,
    weekday => $weekday,
  }

}