Skip to content

Commit

Permalink
[keystone] Add manage_service feature
Browse files Browse the repository at this point in the history
puppet-keystone lacks of disabling service managing. This patch adds
$manage_service parameter to relevant class.

Change-Id: I80a55857442c6cd32387481fbe68b54f52e827a1
Closes-bug: #1359823

Conflicts:
    keystone/manifests/init.pp
  • Loading branch information
paramite committed Nov 19, 2014
1 parent 7685d62 commit a3cda06
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions keystone/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
# Defaults to /var/cache/keystone.
# [memcache_servers] List of memcache servers/ports. Optional. Used with
# token_driver keystone.token.backends.memcache.Token. Defaults to false.
#
# [manage_service]
# (optional) If Puppet should manage service startup / shutdown.
# Defaults to true.
#
# [enabled] If the keystone services should be enabled. Optional. Default to true.
# [sql_connection] Url used to connect to database.
# [idle_timeout] Timeout when db connections should be reaped.
Expand Down Expand Up @@ -168,6 +173,7 @@
$ssl_cert_subject = '/C=US/ST=Unset/L=Unset/O=Unset/CN=localhost',
$cache_dir = '/var/cache/keystone',
$memcache_servers = false,
$manage_service = true,
$enabled = true,
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
$idle_timeout = '200',
Expand Down Expand Up @@ -403,10 +409,12 @@
keystone_config { 'DEFAULT/rabbit_ha_queues': value => false }
}

if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
if $manage_service {
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
}

service { 'keystone':
Expand Down

0 comments on commit a3cda06

Please sign in to comment.