Puppet Class: bamboo::configure
- Defined in:
- manifests/configure.pp
Overview
Private class to manage Bamboo’s configuration
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 |
# File 'manifests/configure.pp', line 3
class bamboo::configure {
file { "${bamboo::real_appdir}/bin/setenv.sh":
ensure => 'file',
owner => $bamboo::user,
group => $bamboo::group,
mode => '0755',
content => template('bamboo/setenv.sh.erb'),
}
file { "${bamboo::real_appdir}/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties":
ensure => 'file',
owner => $bamboo::user,
group => $bamboo::group,
content => "bamboo.home=${bamboo::homedir}",
}
$changes = [
"set Server/Service[#attribute/name='Catalina']/Engine/Host/Context/#attribute/path '${bamboo::context_path}'",
"set Server/Service/Connector/#attribute/maxThreads '${bamboo::max_threads}'",
"set Server/Service/Connector/#attribute/minSpareThreads '${bamboo::min_spare_threads}'",
"set Server/Service/Connector/#attribute/connectionTimeout '${bamboo::connection_timeout}'",
"set Server/Service/Connector/#attribute/port '${bamboo::tomcat_port}'",
"set Server/Service/Connector/#attribute/acceptCount '${bamboo::accept_count}'",
]
if !empty($bamboo::proxy) {
$_proxy = suffix(
prefix(
join_keys_to_values($bamboo::proxy, " '"),
'set Server/Service/Connector[#attribute/protocol = "HTTP/1.1"]/#attribute/'
),
"'"
)
$_changes = concat($changes, $_proxy)
}
else {
$_proxy = undef
$_changes = $changes
}
augeas { "${bamboo::real_appdir}/conf/server.xml":
lens => 'Xml.lns',
incl => "${bamboo::real_appdir}/conf/server.xml",
changes => $_changes,
}
}
|