Move endpoint definitions into separate manifests
This commit is contained in:
parent
27227f7f22
commit
73781b16b3
@ -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,
|
||||
|
@ -1,3 +1,4 @@
|
||||
class kickstack::apinode inherits kickstack {
|
||||
include kickstack::api::keystone
|
||||
include kickstack::endpoints::keystone
|
||||
}
|
||||
|
21
manifests/endpoints/keystone.pp
Normal file
21
manifests/endpoints/keystone.pp
Normal 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']
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user