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 if $::fuel_settings['role'] {
35 if ($::fuel_settings['opnfv'] and
36 $::fuel_settings['opnfv']['ntp']) {
37 case $::fuel_settings['role'] {
39 if $::fuel_settings['opnfv']['ntp']['controller'] {
40 $template = 'opnfv/ntp.conf.controller.erb'
41 $file_content = $::fuel_settings['opnfv']['ntp']['controller']
45 if $::fuel_settings['opnfv']['ntp']['compute'] {
46 $template = 'opnfv/ntp.conf.compute.erb'
47 $file_content = $::fuel_settings['opnfv']['ntp']['compute']
60 content => template($template),
61 notify => Service['ntp'],
67 require => [ Package['ntp'], File[$file]]