Move endpoint definitions into separate manifests

This commit is contained in:
Florian Haas 2013-07-06 14:20:42 +00:00
parent 27227f7f22
commit 73781b16b3
3 changed files with 22 additions and 15 deletions

View File

@ -17,21 +17,6 @@ class kickstack::api::keystone inherits kickstack {
require => Class['::keystone']
}
# Installs the service user endpoint.
class { '::keystone::endpoint':
public_address => "${hostname}${keystone_public_suffix}",
admin_address => "${hostname}${keystone_admin_suffix}",
internal_address => $hostname,
region => $keystone_region,
require => Class['::keystone']
}
kickstack::exportfact::export { "keystone_internal_address":
value => "${hostname}",
tag => "keystone",
require => Class['::keystone::endpoint']
}
# Adds the admin credential to keystone.
class { '::keystone::roles::admin':
email => $keystone_admin_email,

View File

@ -1,3 +1,4 @@
class kickstack::apinode inherits kickstack {
include kickstack::api::keystone
include kickstack::endpoints::keystone
}

View File

@ -0,0 +1,21 @@
class kickstack::endpoints::keystone inherits kickstack {
# Grab the Keystone admin token from a kickstack fact and configure
# Keystone accordingly. If no fact has been set, generate a password.
$admin_token = pick(getvar("${fact_prefix}keystone_admin_token"),pwgen())
# Installs the service user endpoint.
class { '::keystone::endpoint':
public_address => "${hostname}${keystone_public_suffix}",
admin_address => "${hostname}${keystone_admin_suffix}",
internal_address => $hostname,
region => $keystone_region,
require => Class['::keystone']
}
kickstack::exportfact::export { "keystone_internal_address":
value => "${hostname}",
tag => "keystone",
require => Class['::keystone::endpoint']
}
}