From 2085f3a2fd4ca6889c327d9bb46a371a8969a7e8 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 19 May 2015 12:54:53 -0400 Subject: Remove 'require augeas' (#4396) Because the puppet 'require' keyword actually instantiates a class, having 'require augeas' in base.pp means that you cannot instantiate the augeas class anywhere else in your manifests, for example with some optional parameters to the class. If you do, you will get a duplicate definition error. The README already says that the augeas module is required. It seems better that this is managed outside of the module, allowing for class parameter flexibility. --- manifests/base.pp | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifests/base.pp b/manifests/base.pp index 4ee8747..edb0c45 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -27,8 +27,6 @@ class shorewall::base { } } else { - require augeas - augeas { 'shorewall_module_config_path': changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'', lens => 'Shellvars.lns', -- cgit v1.2.3 From 216af53871b3c422652fdccc9cae145914044feb Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 19 May 2015 13:01:09 -0400 Subject: provide a class ordering hint for augeas setup --- manifests/base.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifests/base.pp b/manifests/base.pp index edb0c45..7959f01 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -27,6 +27,8 @@ class shorewall::base { } } else { + Class['augeas'] -> Class['shorewall::base'] + augeas { 'shorewall_module_config_path': changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'', lens => 'Shellvars.lns', -- cgit v1.2.3