1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # stefan.k.berg@ericsson.com
4 # jonas.bjurel@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 # Add Ntp content passed through astute.yaml into ntp.conf depending on the role
15 # Suitable yaml content:
34 case $::operatingsystem {
36 $service_name = 'ntpd'
43 if $::fuel_settings['role'] {
44 if ($::fuel_settings['opnfv'] and
45 $::fuel_settings['opnfv']['ntp']) {
46 case $::fuel_settings['role'] {
48 if $::fuel_settings['opnfv']['ntp']['controller'] {
49 $template = 'opnfv/ntp.conf.controller.erb'
50 $file_content = $::fuel_settings['opnfv']['ntp']['controller']
54 if $::fuel_settings['opnfv']['ntp']['compute'] {
55 $template = 'opnfv/ntp.conf.compute.erb'
56 $file_content = $::fuel_settings['opnfv']['ntp']['compute']
69 content => template($template),
70 notify => Service['ntp'],
75 name => $service_name,
77 require => [ Package['ntp'], File[$file]]