Server package (API)

This commit is contained in:
Endre Karlson 2012-10-09 10:21:36 +02:00
parent 59ae00c404
commit 740da28aef

41
manifests/server.pp Normal file

@ -0,0 +1,41 @@
class quantum::server (
$log_file = "/var/log/quantum/server.log",
) inherits quantum {
require 'keystone::python'
Package["quantum-server"] -> Quantum_api_config<||>
Quantum_config<||> ~> Service["quantum-server"]
Quantum_api_config<||> ~> Service["quantum-server"]
quantum_config {
"DEFAULT/log_file": value => $log_file
}
quantum_api_config {
"filter:authtoken/auth_host": value => $auth_host;
"filter:authtoken/auth_port": value => $auth_port;
"filter:authtoken/auth_user": value => $auth_uri;
"filter:authtoken/admin_tenant_name": value => $keystone_tenant;
"filter:authtoken/admin_user": value => $keystone_user;
"filter:authtoken/admin_password": value => $keystone_password;
}
if $enabled {
$service_ensure = "running"
} else {
$service_ensure = "stopped"
}
package {"quantum-server":
name => $::quantum::params::server_package,
ensure => $package_ensure
}
service {"quantum-server":
name => $::quantum::params::server_service,
ensure => $service_ensure,
enable => $enabled,
hasstatus => true,
hasrestart => true
}
}