From: Dan Prince Date: Fri, 6 Feb 2015 13:42:59 +0000 (-0500) Subject: puppet: only enable Ntp if ntp::servers is set X-Git-Tag: opnfv-6.0.0~2670 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=d5eee576cc2a53aaa0b8e9c5d7efe1b27c11dfa1;p=apex-tripleo-heat-templates.git puppet: only enable Ntp if ntp::servers is set Not all installations have an NtpServer configured and if they don't the ntp service will fail to startup correctly. This patch makes it so that ntp is only enabled if the ntp::servers array is greater than 0. Change-Id: I8417f87ad2a3c1237ebb00ee1232b5313cd45d46 --- diff --git a/puppet/overcloud_compute.pp b/puppet/overcloud_compute.pp index 2ff31be2..0d2790b2 100644 --- a/puppet/overcloud_compute.pp +++ b/puppet/overcloud_compute.pp @@ -24,7 +24,9 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } -include ::ntp +if count(hiera('ntp::servers')) > 0 { + include ::ntp +} class { 'nova': glance_api_servers => join([hiera('glance_protocol'), '://', hiera('glance_host'), ':', hiera('glance_port')]), diff --git a/puppet/overcloud_controller.pp b/puppet/overcloud_controller.pp index 5927e2f7..4801107b 100644 --- a/puppet/overcloud_controller.pp +++ b/puppet/overcloud_controller.pp @@ -26,7 +26,9 @@ if !str2bool(hiera('enable_package_install', 'false')) { if hiera('step') >= 1 { - include ::ntp + if count(hiera('ntp::servers')) > 0 { + include ::ntp + } # TODO Galara class { 'mysql::server': diff --git a/puppet/overcloud_object.pp b/puppet/overcloud_object.pp index c407afad..8d0ad783 100644 --- a/puppet/overcloud_object.pp +++ b/puppet/overcloud_object.pp @@ -23,7 +23,10 @@ if !str2bool(hiera('enable_package_install', 'false')) { } } } -include ::ntp + +if count(hiera('ntp::servers')) > 0 { + include ::ntp +} include ::swift class {'swift::storage::all': diff --git a/puppet/overcloud_volume.pp b/puppet/overcloud_volume.pp index 9351d708..b433321a 100644 --- a/puppet/overcloud_volume.pp +++ b/puppet/overcloud_volume.pp @@ -24,7 +24,9 @@ if str2bool(hiera('disable_package_install', 'false')) { } } -include ::ntp +if count(hiera('ntp::servers')) > 0 { + include ::ntp +} include ::cinder include ::cinder::volume