From 72b383d760c25f2189dcccc30c8faa32ba56242e Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 21 Aug 2014 18:00:43 +0200 Subject: [PATCH] init: use include for ntp class Allow to inject specific parameters via Hiera by using incluse instead of class {'...'}. Signed-off-by: Emilien Macchi --- manifests/init.pp | 2 +- spec/classes/cloud_init_spec.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 0875908b..aec495dd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -58,7 +58,7 @@ This node is under the control of Puppet ${::puppetversion}. } # NTP - class { 'ntp': } + include ::ntp # Strong root password for all servers user { 'root': diff --git a/spec/classes/cloud_init_spec.rb b/spec/classes/cloud_init_spec.rb index 4ed14a71..d74583ac 100644 --- a/spec/classes/cloud_init_spec.rb +++ b/spec/classes/cloud_init_spec.rb @@ -37,6 +37,9 @@ describe 'cloud' do :mode => '0644' } end + + it {should contain_class('ntp')} + it {should contain_file('/etc/motd').with( {:ensure => 'file'}.merge(file_defaults) )}