1 diff --git a/manifests/profile/base/neutron/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp
2 index 3269f3e..556fe63 100644
3 --- a/manifests/profile/base/neutron/opendaylight.pp
4 +++ b/manifests/profile/base/neutron/opendaylight.pp
6 # (Optional) The current step of the deployment
7 # Defaults to hiera('step')
10 -# (Optional) List of OpenStack Controller IPs for ODL API
11 -# Defaults to hiera('opendaylight_api_node_ips')
14 -# (Optional) The short hostname of node
15 -# Defaults to hiera('bootstack_nodeid')
17 +# (Optional) The hostname of the first node of this role type
18 +# Defaults to hiera('bootstrap_nodeid', undef)
20 class tripleo::profile::base::neutron::opendaylight (
21 $step = hiera('step'),
22 - $odl_api_ips = hiera('opendaylight_api_node_ips'),
23 - $node_name = hiera('bootstack_nodeid')
24 + $primary_node = hiera('bootstrap_nodeid', undef),
28 - if empty($odl_api_ips) {
29 - fail('No IPs assigned to OpenDaylight Api Service')
30 - } elsif size($odl_api_ips) == 2 {
31 - fail('2 node OpenDaylight deployments are unsupported. Use 1 or greater than 2')
32 - } elsif size($odl_api_ips) > 2 {
33 - $node_string = split($node_name, '-')
34 - $ha_node_index = $node_string[-1] + 1
35 - class { '::opendaylight':
37 - ha_node_ips => $odl_api_ips,
38 - ha_node_index => $ha_node_index,
41 + # Configure ODL only on first node of the role where this service is
43 + if $primary_node == downcase($::hostname) {
44 include ::opendaylight