Skip to content

Instantly share code, notes, and snippets.

@michaeltchapman
Last active August 29, 2015 14:13
Show Gist options
  • Save michaeltchapman/3f529366e3f315dc6d1e to your computer and use it in GitHub Desktop.
Save michaeltchapman/3f529366e3f315dc6d1e to your computer and use it in GitHub Desktop.
class consul_profile::openstack::compute {
if ! hiera('mysql_Address', false) {
runtime_fail { 'novadbdep':
fail => true,
message => 'novadbdep: requires mysql_Address',
}
} else {
Consul_profile::Discovery::Consul::Multidep<| title == 'novamultidep' |> {
response +> 'novadbdep'
}
}
if ! hiera('glance-api_Address', false) {
runtime_fail { 'novaglancedep':
fail => true,
message => 'novaglancedep: requires glance-api_Address',
}
} else {
Consul_profile::Discovery::Consul::Multidep<| title == 'novamultidep' |> {
response +> 'novaglancedep'
}
}
if ! hiera('rabbitmq_Address', false) {
runtime_fail { 'novarabbitmqdep':
fail => true,
message => 'novarabbitmqdep: requires rabbitmq_Address',
}
} else {
Consul_profile::Discovery::Consul::Multidep<| title == 'novamultidep' |> {
response +> 'novarabbitmqdep'
}
}
consul_profile::discovery::consul::multidep { 'novamultidep':
deps => ['novarabbitmqdep','novaglancedep','novadbdep'],
includes => ['::nova']
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment