Restrict ntp-client on controller nodes

NTP-client task shouldn't be run on controller multirole nodes

Change-Id: I54defe421ded251ad13b665b6fd1843600a517a7
Closes-Bug: #1481627
This commit is contained in:
Oleksiy Molchanov 2015-08-10 17:24:25 +03:00 committed by Alexey Stupnikov
parent bd3345ae33
commit 4cb0751206
1 changed files with 16 additions and 15 deletions

View File

@ -4,20 +4,21 @@ $management_vrouter_vip = hiera('management_vrouter_vip')
$nodes_hash = hiera('nodes', {})
$roles = node_roles($nodes_hash, hiera('uid'))
if !(member($roles, 'controller') or member($roles, 'primary-controller')) {
class { 'ntp':
servers => $ntp_servers,
service_ensure => 'running',
service_enable => true,
iburst_enable => true,
tinker => true,
panic => '0',
stepout => '5',
minpoll => '3',
}
class { 'ntp':
servers => [$management_vrouter_vip],
service_ensure => 'running',
service_enable => true,
iburst_enable => true,
tinker => true,
panic => '0',
stepout => '5',
minpoll => '3',
}
include ntp::params
tweaks::ubuntu_service_override { 'ntpd':
package_name => $ntp::params::package_name,
service_name => $ntp::params::service_name,
include ntp::params
tweaks::ubuntu_service_override { 'ntpd':
package_name => $ntp::params::package_name,
service_name => $ntp::params::service_name,
}
}