Revision 39832902
Added by Eric Helms over 10 years ago
manifests/service.pp | ||
---|---|---|
# Candlepin Service
|
||
# Candlepin Service and Initialization
|
||
class candlepin::service {
|
||
|
||
service { $candlepin::tomcat:
|
||
... | ... | |
enable => true,
|
||
hasstatus => true,
|
||
hasrestart => true,
|
||
require => [
|
||
File["/usr/share/${candlepin::tomcat}/conf/keystore"]
|
||
]
|
||
}
|
||
|
||
exec { 'cpinit':
|
||
# tomcat startup is slow - try multiple times (the initialization service is idempotent)
|
||
command => "/usr/bin/wget --timeout=30 --tries=5 --retry-connrefused -qO- http://localhost:8080/candlepin/admin/init >${candlepin::log_dir}/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done",
|
||
require => [ Service[$candlepin::tomcat], File[$candlepin::log_dir] ],
|
||
require => [Service[$candlepin::tomcat], File[$candlepin::log_dir]],
|
||
creates => '/var/lib/candlepin/cpinit_done'
|
||
}
|
||
|
||
}
|
Also available in: Unified diff
Cleaning up file definitions, flatterning templates directory structure
and reducing dependencies.