Revision 4ad6d02a
Added by Ivan Necas over 10 years ago
manifests/config.pp | ||
---|---|---|
# Configuration for Candlepin
|
||
class candlepin::config {
|
||
include certs
|
||
|
||
user { 'tomcat':
|
||
ensure => present,
|
||
groups => $candlepin::user_groups,
|
||
before => Service[$candlepin::tomcat]
|
||
}
|
||
|
||
file { "/usr/share/${candlepin::tomcat}/conf/keystore":
|
||
ensure => link,
|
||
target => $certs::keystore,
|
||
require => File[$certs::keystore],
|
||
before => Service[$candlepin::tomcat],
|
||
}
|
||
|
||
file {
|
||
... | ... | |
ensure => file,
|
||
content => template('candlepin/etc/candlepin/candlepin.conf.erb'),
|
||
mode => '0600',
|
||
owner => 'tomcat',
|
||
notify => Service[$candlepin::tomcat];
|
||
owner => 'tomcat';
|
||
|
||
"/etc/${candlepin::tomcat}/server.xml":
|
||
ensure => file,
|
||
content => template("candlepin/etc/${candlepin::tomcat}/server.xml.erb"),
|
||
mode => '0644',
|
||
owner => 'root',
|
||
group => 'root',
|
||
notify => Service[$candlepin::tomcat];
|
||
group => 'root';
|
||
|
||
# various tomcat versions had some permission bugs - fix them all
|
||
"/etc/${candlepin::tomcat}":
|
||
... | ... | |
command => "rm -f ${candlepin::log_dir}/cpdb_done; rm -f ${candlepin::log_dir}/cpinit_done; service ${candlepin::tomcat} stop; test 1 -eq 1",
|
||
path => '/sbin:/bin:/usr/bin',
|
||
before => Exec['cpdb'],
|
||
notify => Postgresql::Dropdb[$candlepin::db_name],
|
||
}
|
||
postgresql::dropdb {$candlepin::db_name:
|
||
logfile => "${candlepin::log_dir}/drop-postgresql-candlepin-database.log",
|
Also available in: Unified diff
Extract Candlepin specific certs settings into candlepin::certs