From 6fb278603b5c56460630dfe40657bba0bb2f8091 Mon Sep 17 00:00:00 2001 From: Max Wilhelm Date: Thu, 3 Dec 2015 19:28:11 +0100 Subject: [PATCH] changed class calls in init.pp this is needed to be able to test classes independently. All these sub classes inherit from the base class (::fluentd). If you call these classes directly you will get a duplicated declaration error. --- manifests/init.pp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 1108099..0b8fca2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -67,9 +67,16 @@ class fluentd ( fail('service_ensure parameter must be running or stopped') } - class { '::fluentd::repo': } -> - class { '::fluentd::install': } -> - class { '::fluentd::config': } -> - class { '::fluentd::service': } + # class calls + include '::fluentd::repo' + include '::fluentd::install' + include '::fluentd::config' + include '::fluentd::service' + + # dependencies + Class['::Fluentd::Repo'] -> + Class['::Fluentd::Install'] -> + Class['::Fluentd::Config'] -> + Class['::Fluentd::Service'] }