Skip to content

Instantly share code, notes, and snippets.

@robinbowes
Created June 28, 2012 12:39
Show Gist options
  • Save robinbowes/3011116 to your computer and use it in GitHub Desktop.
Save robinbowes/3011116 to your computer and use it in GitHub Desktop.
class mod_jk::config::workers{
include
::concat::setup
$file = '/etc/httpd/conf/workers.properties'
concat{$file:
notify => Class['::apache::service']
}
}
define mod_jk::config::workers::fragment (
$owner = 'root',
$group = 'root',
$mode = '0644',
$content = '',
$source = '',
$order
){
include
::mod_jk::config::workers
# decide whether to use content or source
if $source and $content {
fail("Can't specify both source and content")
} elsif $source {
Concat::Fragment{ source => $source }
} elsif $content {
Concat::Fragment{ content => $content }
} else {
fail('Must specify either source or content')
}
::concat::fragment{$name:
group => $group,
mode => $mode,
order => $order,
owner => $owner,
target => $mod_jk::config::workers::file,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment